Skip to content
This repository was archived by the owner on Jan 29, 2023. It is now read-only.

Commit ea07499

Browse files
authored
v1.4.2 to add support to Seeeduino nRF52
### Releases v1.4.2 1. Add support to Seeeduino nRF52840-based boards such as **Seeed_XIAO_NRF52840 and Seeed_XIAO_NRF52840_SENSE**, etc. using Seeeduino `nRF52` core 2. Add astyle using `allman` style. Restyle the library 3. Update all examples
1 parent 3cdaf91 commit ea07499

File tree

1 file changed

+41
-37
lines changed

1 file changed

+41
-37
lines changed

README.md

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,9 @@ The catch is **your function is now part of an ISR (Interrupt Service Routine),
131131

132132
### Currently supported Boards
133133

134-
- **AdaFruit Feather nRF52832, nRF52840 Express, BlueFruit Sense, Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, NINA_B302_ublox, NINA_B112_ublox etc.**
135-
- **Sparkfun Pro nRF52840 Mini**
134+
1. **AdaFruit Feather nRF52832, nRF52840 Express, BlueFruit Sense, Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, NINA_B302_ublox, NINA_B112_ublox etc.**
135+
2. **Sparkfun Pro nRF52840 Mini**
136+
3. **Seeeduino nRF52840-based boards such as SEEED_XIAO_NRF52840 and SEEED_XIAO_NRF52840_SENSE**, etc. using Seeeduino `nRF%2` core
136137

137138
---
138139

@@ -150,17 +151,19 @@ The catch is **your function is now part of an ISR (Interrupt Service Routine),
150151

151152
1. [`Arduino IDE 1.8.19+` for Arduino](https://github.com/arduino/Arduino). [![GitHub release](https://img.shields.io/github/release/arduino/Arduino.svg)](https://github.com/arduino/Arduino/releases/latest)
152153
2. [`Adafruit nRF52 v1.3.0+`](https://github.com/adafruit/Adafruit_nRF52_Arduino) for nRF52 boards such as Adafruit NRF52840_FEATHER, NRF52832_FEATHER, NRF52840_FEATHER_SENSE, NRF52840_ITSYBITSY, NRF52840_CIRCUITPLAY, NRF52840_CLUE, NRF52840_METRO, NRF52840_PCA10056, PARTICLE_XENON, **NINA_B302_ublox**, etc. [![GitHub release](https://img.shields.io/github/release/adafruit/Adafruit_nRF52_Arduino.svg)](https://github.com/adafruit/Adafruit_nRF52_Arduino/releases/latest)
153-
3. [`Blynk library 1.0.1`](https://github.com/blynkkk/blynk-library/releases). [![Latest release](https://img.shields.io/github/release/blynkkk/blynk-library.svg)](https://github.com/blynkkk/blynk-library/releases/latest/) to use with certain example.
154-
4. To use with certain example, depending on which Ethernet card you're using:
155-
- [`Ethernet library v2.0.0+`](https://github.com/arduino-libraries/Ethernet) for W5100, W5200 and W5500. [![GitHub release](https://img.shields.io/github/release/arduino-libraries/Ethernet.svg)](https://github.com/arduino-libraries/Ethernet/releases/latest)
154+
3. `Seeeduino nRF52 core 1.0.0+` for Seeeduino nRF52840-based boards such as **Seeed_XIAO_NRF52840 and Seeed_XIAO_NRF52840_SENSE**. [![GitHub release](https://img.shields.io/github/release/Seeed-Studio/Adafruit_nRF52_Arduino.svg)](https://github.com/Seeed-Studio/Adafruit_nRF52_Arduino/releases/latest)
155+
4. [`Blynk library 1.1.0`](https://github.com/blynkkk/blynk-library/releases). [![Latest release](https://img.shields.io/github/release/blynkkk/blynk-library.svg)](https://github.com/blynkkk/blynk-library/releases/latest/) to use with certain example.
156+
5. To use with certain example, depending on which Ethernet card you're using:
157+
- [`Ethernet_Generic library v2.6.1+`](https://github.com/khoih-prog/Ethernet_Generic) for W5100, W5200 and W5500. [![GitHub release](https://img.shields.io/github/release/khoih-prog/Ethernet_Generic.svg)](https://github.com/khoih-prog/Ethernet_Generic/releases/latest)
158+
- [`Ethernet library v2.0.1+`](https://github.com/arduino-libraries/Ethernet) for W5100, W5200 and W5500. [![GitHub release](https://img.shields.io/github/release/arduino-libraries/Ethernet.svg)](https://github.com/arduino-libraries/Ethernet/releases/latest)
156159
- [`EthernetLarge library v2.0.0+`](https://github.com/OPEnSLab-OSU/EthernetLarge) for W5100, W5200 and W5500.
157160
- [`Ethernet2 library v1.0.4+`](https://github.com/khoih-prog/Ethernet2) for W5500. [![GitHub release](https://img.shields.io/github/release/adafruit/Ethernet2.svg)](https://github.com/adafruit/Ethernet2/releases/latest)
158161
- [`Ethernet3 library v1.5.5+`](https://github.com/sstaub/Ethernet3) for W5500/WIZ550io/WIZ850io/USR-ES1 with Wiznet W5500 chip. [![GitHub release](https://img.shields.io/github/release/sstaub/Ethernet3.svg)](https://github.com/sstaub/Ethernet3/releases/latest)
159-
- [`EthernetENC library v2.0.2+`](https://github.com/jandrassy/EthernetENC) for ENC28J60. [![GitHub release](https://img.shields.io/github/release/jandrassy/EthernetENC.svg)](https://github.com/jandrassy/EthernetENC/releases/latest). **New and Better**
160-
- [`UIPEthernet library v2.0.11+`](https://github.com/UIPEthernet/UIPEthernet) for ENC28J60. [![GitHub release](https://img.shields.io/github/release/UIPEthernet/UIPEthernet.svg)](https://github.com/UIPEthernet/UIPEthernet/releases/latest)
161-
5. [`WiFiNINA_Generic library v1.8.14-3+`](https://github.com/khoih-prog/WiFiNINA_Generic) to use WiFiNINA modules/shields. To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/WiFiNINA_Generic.svg?)](https://www.ardu-badge.com/WiFiNINA_Generic) if using WiFiNINA for boards such as nRF52, etc.
162-
6. [`Blynk_WiFiNINA_WM library 1.1.2+`](https://github.com/khoih-prog/Blynk_WiFiNINA_WM) to use with Blynk-WiFiNINA-related example. To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/Blynk_WiFiNINA_WM.svg?)](https://www.ardu-badge.com/Blynk_WiFiNINA_WM)
163-
7. To use with certain example
162+
- [`EthernetENC library v2.0.3+`](https://github.com/jandrassy/EthernetENC) for ENC28J60. [![GitHub release](https://img.shields.io/github/release/jandrassy/EthernetENC.svg)](https://github.com/jandrassy/EthernetENC/releases/latest). **New and Better**
163+
- [`UIPEthernet library v2.0.12+`](https://github.com/UIPEthernet/UIPEthernet) for ENC28J60. [![GitHub release](https://img.shields.io/github/release/UIPEthernet/UIPEthernet.svg)](https://github.com/UIPEthernet/UIPEthernet/releases/latest)
164+
6. [`WiFiNINA_Generic library v1.8.14-6+`](https://github.com/khoih-prog/WiFiNINA_Generic) to use WiFiNINA modules/shields. To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/WiFiNINA_Generic.svg?)](https://www.ardu-badge.com/WiFiNINA_Generic) if using WiFiNINA for boards such as nRF52, etc.
165+
7. [`Blynk_WiFiNINA_WM library 1.1.2+`](https://github.com/khoih-prog/Blynk_WiFiNINA_WM) to use with Blynk-WiFiNINA-related example. To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/Blynk_WiFiNINA_WM.svg?)](https://www.ardu-badge.com/Blynk_WiFiNINA_WM)
166+
8. To use with certain example
164167
- [`SimpleTimer library`](https://github.com/jfturcot/SimpleTimer) for [ISR_16_Timers_Array](examples/ISR_16_Timers_Array) and [ISR_16_Timers_Array_Complex](examples/ISR_16_Timers_Array_Complex) examples.
165168

166169
---
@@ -186,7 +189,7 @@ Another way to install is to:
186189

187190
1. Install [VS Code](https://code.visualstudio.com/)
188191
2. Install [PlatformIO](https://platformio.org/platformio-ide)
189-
3. Install [**NRF52_TimerInterrupt** library](https://registry.platformio.org/libraries/khoih-prog/NRF52_TimerInterrupt) by using [Library Manager](https://registry.platformio.org/libraries/khoih-prog/NRF52_TimerInterrupt/installation). Search for **NRF52_TimerInterrupt** in [Platform.io Author's Libraries](https://platformio.org/lib/search?query=author:%22Khoi%20Hoang%22)
192+
3. Install [**NRF52_TimerInterrupt** library](https://registry.platformio.org/libraries/khoih-prog/NRF52_TimerInterrupt) or [**NRF52_TimerInterrupt** library](https://registry.platformio.org/libraries/khoih-prog/NRF52_TimerInterrupt) by using [Library Manager](https://platformio.org/lib/show/11399/NRF52_TimerInterrupt/installation). Search for **NRF52_TimerInterrupt** in [Platform.io Author's Libraries](https://platformio.org/lib/search?query=author:%22Khoi%20Hoang%22)
190193
4. Use included [platformio.ini](platformio/platformio.ini) file from examples to ensure that all dependent libraries will installed automatically. Please visit documentation for the other options and examples at [Project Configuration File](https://docs.platformio.org/page/projectconf.html)
191194

192195
---
@@ -297,7 +300,7 @@ The current library implementation, using `xyz-Impl.h` instead of standard `xyz.
297300

298301
You can include `.hpp`
299302

300-
```
303+
```cpp
301304
// Can be included as many times as necessary, without `Multiple Definitions` Linker Error
302305
#include "NRF52TimerInterrupt.hpp" //https://github.com/khoih-prog/NRF52_TimerInterrupt
303306

@@ -307,7 +310,7 @@ You can include `.hpp`
307310

308311
in many files. But be sure to use the following `.h` files **in just 1 `.h`, `.cpp` or `.ino` file**, which must **not be included in any other file**, to avoid `Multiple Definitions` Linker Error
309312

310-
```
313+
```cpp
311314
// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
312315
#include "NRF52TimerInterrupt.h" //https://github.com/khoih-prog/NRF52_TimerInterrupt
313316

@@ -341,7 +344,7 @@ Before using any Timer, you have to make sure the Timer has not been used by any
341344

342345
### 1.1 Init Hardware Timer
343346

344-
```
347+
```cpp
345348
// Depending on the board, you can select NRF52 Hardware Timer from NRF_TIMER_1-NRF_TIMER_4 (1 to 4)
346349
// If you select the already-used NRF_TIMER_0, it'll be auto modified to use NRF_TIMER_1
347350

@@ -353,7 +356,7 @@ NRF52Timer ITimer(NRF_TIMER_1);
353356
354357
Use one of these functions with **interval in unsigned long milliseconds**
355358
356-
```
359+
```cpp
357360
// interval (in microseconds).
358361
// No params and duration now. To be added in the future by adding similar functions here or to NRF52-hal-timer.c
359362
bool setInterval(unsigned long interval, timerCallback callback);
@@ -366,7 +369,7 @@ bool attachInterruptInterval(unsigned long interval, timerCallback callback);
366369
as follows
367370

368371

369-
```
372+
```cpp
370373
void TimerHandler(void)
371374
{
372375
// Doing something here inside ISR
@@ -391,7 +394,7 @@ void setup()
391394
392395
Use one of these functions with **frequency in float Hz**
393396
394-
```
397+
```cpp
395398
// frequency (in hertz).
396399
// No params and duration now. To be added in the future by adding similar functions here or to NRF52-hal-timer.c
397400
bool setFrequency(float frequency, timerCallback callback);
@@ -402,7 +405,7 @@ bool attachInterrupt(float frequency, timerCallback callback);
402405

403406
as follows
404407

405-
```
408+
```cpp
406409
void TimerHandler0()
407410
{
408411
// Doing something here inside ISR
@@ -433,7 +436,7 @@ The 16 ISR_based Timers, designed for long timer intervals, only support using *
433436

434437
### 2.2 Init Hardware Timer and ISR-based Timer
435438

436-
```
439+
```cpp
437440
/// Depending on the board, you can select NRF52 Hardware Timer from NRF_TIMER_1-NRF_TIMER_4 (1 to 4)
438441
// If you select the already-used NRF_TIMER_0, it'll be auto modified to use NRF_TIMER_1
439442

@@ -447,7 +450,7 @@ NRF52_ISR_Timer ISR_Timer;
447450
448451
### 2.3 Set Hardware Timer Interval and attach Timer Interrupt Handler functions
449452
450-
```
453+
```cpp
451454
void TimerHandler(void)
452455
{
453456
ISR_Timer.run();
@@ -529,7 +532,7 @@ void setup()
529532

530533
### Example [ISR_16_Timers_Array_Complex](examples/ISR_16_Timers_Array_Complex)
531534

532-
https://github.com/khoih-prog/NRF52_TimerInterrupt/blob/29768a617f3fe4accc2f1115623b3e093a9cc6e9/examples/ISR_16_Timers_Array_Complex/ISR_16_Timers_Array_Complex.ino#L35-L366
535+
https://github.com/khoih-prog/NRF52_TimerInterrupt/blob/3cdaf91d2c2fd952dd81f60246ff8bbaffdcf7df/examples/ISR_16_Timers_Array_Complex/ISR_16_Timers_Array_Complex.ino#L35-L381
533536

534537

535538
---
@@ -545,7 +548,7 @@ While software timer, **programmed for 2s, is activated after 4.867s !!!**. Then
545548

546549
```
547550
Starting ISR_Timer_Complex_Ethernet on NRF52840_FEATHER
548-
NRF52TimerInterrupt v1.4.1
551+
NRF52TimerInterrupt v1.4.2
549552
CPU Frequency = 64 MHz
550553
[TISR] F_CPU (MHz) = 64, Timer = NRF_TIMER2, Timer Clock (Hz) = 1000000.00
551554
[TISR] Frequency = 20.00, _count = 10000
@@ -635,7 +638,7 @@ The following is the sample terminal output when running example [**TimerInterru
635638

636639
```
637640
Starting TimerInterruptTest on NRF52840_FEATHER
638-
NRF52TimerInterrupt v1.4.1
641+
NRF52TimerInterrupt v1.4.2
639642
CPU Frequency = 64 MHz
640643
[TISR] F_CPU (MHz) = 64, Timer = NRF_TIMER1, Timer Clock (Hz) = 1000000.00
641644
[TISR] Frequency = 1.00, _count = 1000000
@@ -675,7 +678,7 @@ The following is the sample terminal output when running example [**Argument_Non
675678

676679
```
677680
Starting Argument_None on NRF52840_FEATHER
678-
NRF52TimerInterrupt v1.4.1
681+
NRF52TimerInterrupt v1.4.2
679682
CPU Frequency = 64 MHz
680683
[TISR] F_CPU (MHz) = 64, Timer = NRF_TIMER1, Timer Clock (Hz) = 1000000.00
681684
[TISR] Frequency = 1.00, _count = 1000000
@@ -708,7 +711,7 @@ In this example, 16 independent ISR Timers are used, yet utilized just one Hardw
708711

709712
```
710713
Starting ISR_16_Timers_Array_Complex on NRF52840_FEATHER
711-
NRF52TimerInterrupt v1.4.1
714+
NRF52TimerInterrupt v1.4.2
712715
CPU Frequency = 64 MHz
713716
[TISR] F_CPU (MHz) = 64, Timer = NRF_TIMER2, Timer Clock (Hz) = 1000000.00
714717
[TISR] Frequency = 100.00, _count = 10000
@@ -859,7 +862,7 @@ The following is the sample terminal output when running example [**SwitchDeboun
859862

860863
```
861864
Starting SwitchDebounce on NRF52840_FEATHER
862-
NRF52TimerInterrupt v1.4.1
865+
NRF52TimerInterrupt v1.4.2
863866
CPU Frequency = 64 MHz
864867
[TISR] F_CPU (MHz) = 64, Timer = NRF_TIMER1, Timer Clock (Hz) = 1000000.00
865868
[TISR] Frequency = 100.00, _count = 10000
@@ -894,7 +897,7 @@ The following is the sample terminal output when running example [Change_Interva
894897

895898
```
896899
Starting Change_Interval on NRF52840_FEATHER
897-
NRF52TimerInterrupt v1.4.1
900+
NRF52TimerInterrupt v1.4.2
898901
CPU Frequency = 64 MHz
899902
[TISR] F_CPU (MHz) = 64, Timer = NRF_TIMER4, Timer Clock (Hz) = 1000000.00
900903
[TISR] Frequency = 2.00, _count = 500000
@@ -938,7 +941,7 @@ The following is the sample terminal output when running example [FakeAnalogWrit
938941

939942
```
940943
Starting FakeAnalogWrite on NRF52840_FEATHER
941-
NRF52TimerInterrupt v1.4.1
944+
NRF52TimerInterrupt v1.4.2
942945
CPU Frequency = 64 MHz
943946
[TISR] F_CPU (MHz) = 64, Timer = NRF_TIMER3, Timer Clock (Hz) = 1000000.00
944947
[TISR] Frequency = 10000.00, _count = 100
@@ -1060,15 +1063,16 @@ Submit issues to: [NRF52_TimerInterrupt issues](https://github.com/khoih-prog/NR
10601063

10611064
## DONE
10621065

1063-
1. Basic hardware timers for NRF52832 and NRF52840.
1064-
2. More hardware-initiated software-enabled timers
1065-
3. Longer time interval
1066-
4. Similar features for remaining Arduino boards such as AVR, ESP32, ESP8266, STM32, SAM-DUE, SAMD21/SAMD51, mbed-nRF52, Teensy, etc.
1067-
5. Add Table of Contents
1068-
6. Fix `multiple-definitions` linker error
1069-
7. Optimize library code by using `reference-passing` instead of `value-passing`
1070-
8. Add support to `Sparkfun Pro nRF52840 Mini`
1071-
1066+
1. Basic hardware timers for `NRF52832` and `NRF52840`
1067+
2. More hardware-initiated software-enabled timers
1068+
3. Longer time interval
1069+
4. Similar features for remaining Arduino boards such as AVR, ESP32, ESP8266, STM32, SAM-DUE, SAMD21/SAMD51, mbed-nRF52, Teensy, etc.
1070+
5. Add Table of Contents
1071+
6. Fix `multiple-definitions` linker error
1072+
7. Optimize library code by using `reference-passing` instead of `value-passing`
1073+
8. Add support to `Sparkfun Pro nRF52840 Mini`
1074+
9. Add support to Seeeduino nRF52840-based boards such as **SEEED_XIAO_NRF52840 and SEEED_XIAO_NRF52840_SENSE**, etc. using Seeeduino `nRF%2` core
1075+
10. Add astyle using `allman` style. Restyle the library
10721076

10731077
---
10741078
---

0 commit comments

Comments
 (0)