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

Commit 3c356a5

Browse files
authored
v1.2.0
### Releases v1.2.0 1. Add better debug feature. 2. Optimize code and examples to reduce RAM usage
1 parent 6dfc9c7 commit 3c356a5

34 files changed

+1909
-1789
lines changed

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* [Currently supported Boards](#currently-supported-boards)
1717
* [Important Notes about ISR](#important-notes-about-isr)
1818
* [Changelog](#changelog)
19+
* [Releases v1.2.0](#releases-v120)
1920
* [Releases v1.1.2](#releases-v112)
2021
* [Releases v1.1.1](#releases-v111)
2122
* [Releases v1.0.3](#releases-v103)
@@ -116,7 +117,6 @@ The catch is your function is now part of an ISR (Interrupt Service Routine), an
116117
### Currently supported Boards
117118

118119
- Arduino Uno / Mega / Leonardo / Duemilanove / Diecimila / LilyPad / Mini / Fio / Nano etc.
119-
- Teensy 1.0 / 1.0++ / 2.0 / 2++ / 3.0 / 3.1 / Teensy-LC;
120120
- Sanguino
121121
- ATmega8, 48, 88, 168, 328
122122
- ATmega8535, 16, 32, 164, 324, 644, 1284,
@@ -128,13 +128,18 @@ The catch is your function is now part of an ISR (Interrupt Service Routine), an
128128

129129
## Changelog
130130

131+
### Releases v1.2.0
132+
133+
1. Add better debug feature.
134+
2. Optimize code and examples to reduce RAM usage
135+
136+
131137
### Releases v1.1.2
132138

133139
1. Clean-up all compiler warnings possible.
134140
2. Optimize examples to reduce memory usage by using Flash String whenever possible.
135141
3. Add Table of Contents
136142

137-
138143
### Releases v1.1.1
139144

140145
1. Add example [**Change_Interval**](examples/Change_Interval)
@@ -157,7 +162,6 @@ The catch is your function is now part of an ISR (Interrupt Service Routine), an
157162

158163
1. [`Arduino IDE 1.8.13+` for Arduino](https://www.arduino.cc/en/Main/Software)
159164
2. [`Arduino AVR core 1.8.3+`](https://github.com/arduino/ArduinoCore-avr) for Arduino AVR boards. Use Arduino Board Manager to install.
160-
3. [`Teensy core 1.53+`](https://www.pjrc.com/teensy/td_download.html) for Teensy (3.1, 3.0, LC, 2.0) boards.
161165

162166
---
163167
---
@@ -379,8 +383,10 @@ void loop()
379383
#endif
380384

381385
// These define's must be placed at the beginning before #include "TimerInterrupt.h"
382-
// Don't define TIMER_INTERRUPT_DEBUG > 0. Only for special ISR debugging only. Can hang the system.
383-
#define TIMER_INTERRUPT_DEBUG 0
386+
// _TIMERINTERRUPT_LOGLEVEL_ from 0 to 4
387+
// Don't define _TIMERINTERRUPT_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
388+
#define TIMER_INTERRUPT_DEBUG 0
389+
#define _TIMERINTERRUPT_LOGLEVEL_ 0
384390

385391
#define USE_TIMER_1 false
386392
#define USE_TIMER_2 true
@@ -645,7 +651,7 @@ void setup()
645651
Serial.begin(115200);
646652
while (!Serial);
647653

648-
Serial.println(F("\nStarting ISR_16_Timers_Array_Complex"));
654+
Serial.println(F("\nStarting ISR_16_Timers_Array_Complex on AVR"));
649655
Serial.println(TIMER_INTERRUPT_VERSION);
650656
Serial.print(F("CPU Frequency = ")); Serial.print(F_CPU / 1000000); Serial.println(F(" MHz"));
651657

@@ -905,6 +911,11 @@ Sometimes, the library will only work if you update the board core to the latest
905911

906912
## Releases
907913

914+
### Releases v1.2.0
915+
916+
1. Add better debug feature.
917+
2. Optimize code and examples to reduce RAM usage
918+
908919
### Releases v1.1.2
909920

910921
1. Clean-up all compiler warnings possible.
@@ -940,7 +951,6 @@ in loop(), using delay() function as an example. The elapsed time then is very u
940951
### Supported Arduino Boards
941952

942953
- Arduino Uno / Mega / Leonardo / Duemilanove / Diecimila / LilyPad / Mini / Fio / Nano etc.
943-
- Teensy 1.0 / 1.0++ / 2.0 / 2++ / 3.0 / 3.1 / Teensy-LC;
944954
- Sanguino
945955
- ATmega8, 48, 88, 168, 328
946956
- ATmega8535, 16, 32, 164, 324, 644, 1284,

examples/Argument_Complex/Argument_Complex.ino

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
2323
or the entire sequence of your code which accesses the data.
2424
25-
Version: 1.1.2
25+
Version: 1.2.0
2626
2727
Version Modified By Date Comments
2828
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
3232
1.0.3 K.Hoang 01/12/2020 Add complex examples ISR_16_Timers_Array_Complex and ISR_16_Timers_Array_Complex
3333
1.1.1 K.Hoang 06/12/2020 Add example Change_Interval. Bump up version to sync with other TimerInterrupt Libraries
3434
1.1.2 K.Hoang 05/01/2021 Fix warnings. Optimize examples to reduce memory usage
35+
1.2.0 K.Hoang 07/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
3536
*****************************************************************************************************************************/
3637

3738
#if defined(__AVR_ATmega8__) || defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || \
@@ -45,8 +46,10 @@
4546
#endif
4647

4748
// These define's must be placed at the beginning before #include "TimerInterrupt.h"
48-
// Don't define TIMER_INTERRUPT_DEBUG > 0. Only for special ISR debugging only. Can hang the system.
49-
#define TIMER_INTERRUPT_DEBUG 0
49+
// _TIMERINTERRUPT_LOGLEVEL_ from 0 to 4
50+
// Don't define _TIMERINTERRUPT_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
51+
#define TIMER_INTERRUPT_DEBUG 0
52+
#define _TIMERINTERRUPT_LOGLEVEL_ 0
5053

5154
#define USE_TIMER_1 true
5255
#define USE_TIMER_2 false

examples/Argument_None/Argument_None.ino

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
2323
or the entire sequence of your code which accesses the data.
2424
25-
Version: 1.1.2
25+
Version: 1.2.0
2626
2727
Version Modified By Date Comments
2828
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
3232
1.0.3 K.Hoang 01/12/2020 Add complex examples ISR_16_Timers_Array_Complex and ISR_16_Timers_Array_Complex
3333
1.1.1 K.Hoang 06/12/2020 Add example Change_Interval. Bump up version to sync with other TimerInterrupt Libraries
3434
1.1.2 K.Hoang 05/01/2021 Fix warnings. Optimize examples to reduce memory usage
35+
1.2.0 K.Hoang 07/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
3536
*****************************************************************************************************************************/
3637

3738
#if defined(__AVR_ATmega8__) || defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || \
@@ -45,8 +46,10 @@
4546
#endif
4647

4748
// These define's must be placed at the beginning before #include "TimerInterrupt.h"
48-
// Don't define TIMER_INTERRUPT_DEBUG > 0. Only for special ISR debugging only. Can hang the system.
49-
#define TIMER_INTERRUPT_DEBUG 0
49+
// _TIMERINTERRUPT_LOGLEVEL_ from 0 to 4
50+
// Don't define _TIMERINTERRUPT_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
51+
#define TIMER_INTERRUPT_DEBUG 0
52+
#define _TIMERINTERRUPT_LOGLEVEL_ 0
5053

5154
#define USE_TIMER_1 true
5255
#define USE_TIMER_2 true

examples/Argument_Simple/Argument_Simple.ino

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
2323
or the entire sequence of your code which accesses the data.
2424
25-
Version: 1.1.2
25+
Version: 1.2.0
2626
2727
Version Modified By Date Comments
2828
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
3232
1.0.3 K.Hoang 01/12/2020 Add complex examples ISR_16_Timers_Array_Complex and ISR_16_Timers_Array_Complex
3333
1.1.1 K.Hoang 06/12/2020 Add example Change_Interval. Bump up version to sync with other TimerInterrupt Libraries
3434
1.1.2 K.Hoang 05/01/2021 Fix warnings. Optimize examples to reduce memory usage
35+
1.2.0 K.Hoang 07/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
3536
*****************************************************************************************************************************/
3637

3738
#if defined(__AVR_ATmega8__) || defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || \
@@ -45,8 +46,10 @@
4546
#endif
4647

4748
// These define's must be placed at the beginning before #include "TimerInterrupt.h"
48-
// Don't define TIMER_INTERRUPT_DEBUG > 0. Only for special ISR debugging only. Can hang the system.
49-
#define TIMER_INTERRUPT_DEBUG 0
49+
// _TIMERINTERRUPT_LOGLEVEL_ from 0 to 4
50+
// Don't define _TIMERINTERRUPT_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
51+
#define TIMER_INTERRUPT_DEBUG 0
52+
#define _TIMERINTERRUPT_LOGLEVEL_ 0
5053

5154
#define USE_TIMER_1 true
5255
#define USE_TIMER_2 true

examples/Change_Interval/Change_Interval.ino

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
2323
or the entire sequence of your code which accesses the data.
2424
25-
Version: 1.1.2
25+
Version: 1.2.0
2626
2727
Version Modified By Date Comments
2828
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
3232
1.0.3 K.Hoang 01/12/2020 Add complex examples ISR_16_Timers_Array_Complex and ISR_16_Timers_Array_Complex
3333
1.1.1 K.Hoang 06/12/2020 Add example Change_Interval. Bump up version to sync with other TimerInterrupt Libraries
3434
1.1.2 K.Hoang 05/01/2021 Fix warnings. Optimize examples to reduce memory usage
35+
1.2.0 K.Hoang 07/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
3536
*****************************************************************************************************************************/
3637

3738
/*
@@ -57,8 +58,10 @@
5758
#endif
5859

5960
// These define's must be placed at the beginning before #include "TimerInterrupt.h"
60-
// Don't define TIMER_INTERRUPT_DEBUG > 0. Only for special ISR debugging only. Can hang the system.
61-
#define TIMER_INTERRUPT_DEBUG 0
61+
// _TIMERINTERRUPT_LOGLEVEL_ from 0 to 4
62+
// Don't define _TIMERINTERRUPT_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
63+
#define TIMER_INTERRUPT_DEBUG 0
64+
#define _TIMERINTERRUPT_LOGLEVEL_ 0
6265

6366
#define USE_TIMER_1 true
6467
#define USE_TIMER_2 true

examples/FakeAnalogWrite/FakeAnalogWrite.ino

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
2323
or the entire sequence of your code which accesses the data.
2424
25-
Version: 1.1.2
25+
Version: 1.2.0
2626
2727
Version Modified By Date Comments
2828
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
3232
1.0.3 K.Hoang 01/12/2020 Add complex examples ISR_16_Timers_Array_Complex and ISR_16_Timers_Array_Complex
3333
1.1.1 K.Hoang 06/12/2020 Add example Change_Interval. Bump up version to sync with other TimerInterrupt Libraries
3434
1.1.2 K.Hoang 05/01/2021 Fix warnings. Optimize examples to reduce memory usage
35+
1.2.0 K.Hoang 07/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
3536
*****************************************************************************************************************************/
3637
/*
3738
Notes:
@@ -64,8 +65,10 @@
6465
#endif
6566

6667
// These define's must be placed at the beginning before #include "TimerInterrupt.h"
67-
// Don't define TIMER_INTERRUPT_DEBUG > 0. Only for special ISR debugging only. Can hang the system.
68-
#define TIMER_INTERRUPT_DEBUG 0
68+
// _TIMERINTERRUPT_LOGLEVEL_ from 0 to 4
69+
// Don't define _TIMERINTERRUPT_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
70+
#define TIMER_INTERRUPT_DEBUG 0
71+
#define _TIMERINTERRUPT_LOGLEVEL_ 0
6972

7073
#define USE_TIMER_1 false
7174
#define USE_TIMER_2 true

examples/ISR_16_Timers_Array_Complex/ISR_16_Timers_Array_Complex.ino

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
2323
or the entire sequence of your code which accesses the data.
2424
25-
Version: 1.1.2
25+
Version: 1.2.0
2626
2727
Version Modified By Date Comments
2828
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
3232
1.0.3 K.Hoang 01/12/2020 Add complex examples ISR_16_Timers_Array_Complex and ISR_16_Timers_Array_Complex
3333
1.1.1 K.Hoang 06/12/2020 Add example Change_Interval. Bump up version to sync with other TimerInterrupt Libraries
3434
1.1.2 K.Hoang 05/01/2021 Fix warnings. Optimize examples to reduce memory usage
35+
1.2.0 K.Hoang 07/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
3536
*****************************************************************************************************************************/
3637

3738
#if defined(__AVR_ATmega8__) || defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || \
@@ -45,8 +46,10 @@
4546
#endif
4647

4748
// These define's must be placed at the beginning before #include "TimerInterrupt.h"
48-
// Don't define TIMER_INTERRUPT_DEBUG > 0. Only for special ISR debugging only. Can hang the system.
49-
#define TIMER_INTERRUPT_DEBUG 0
49+
// _TIMERINTERRUPT_LOGLEVEL_ from 0 to 4
50+
// Don't define _TIMERINTERRUPT_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
51+
#define TIMER_INTERRUPT_DEBUG 0
52+
#define _TIMERINTERRUPT_LOGLEVEL_ 0
5053

5154
#define USE_TIMER_1 false
5255
#define USE_TIMER_2 true

examples/ISR_RPM_Measure/ISR_RPM_Measure.ino

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
2323
or the entire sequence of your code which accesses the data.
2424
25-
Version: 1.1.2
25+
Version: 1.2.0
2626
2727
Version Modified By Date Comments
2828
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
3232
1.0.3 K.Hoang 01/12/2020 Add complex examples ISR_16_Timers_Array_Complex and ISR_16_Timers_Array_Complex
3333
1.1.1 K.Hoang 06/12/2020 Add example Change_Interval. Bump up version to sync with other TimerInterrupt Libraries
3434
1.1.2 K.Hoang 05/01/2021 Fix warnings. Optimize examples to reduce memory usage
35+
1.2.0 K.Hoang 07/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
3536
*****************************************************************************************************************************/
3637
/* RPM Measuring uses high frequency hardware timer 1Hz == 1ms) to measure the time from of one rotation, in ms
3738
then convert to RPM. One rotation is detected by reading the state of a magnetic REED SW or IR LED Sensor
@@ -54,9 +55,11 @@
5455
#error This is designed only for Arduino AVR board! Please check your Tools->Board setting.
5556
#endif
5657

57-
//These define's must be placed at the beginning before #include "TimerInterrupt.h"
58-
// Don't define TIMER_INTERRUPT_DEBUG > 2. Only for special ISR debugging only. Can hang the system.
59-
#define TIMER_INTERRUPT_DEBUG 0
58+
// These define's must be placed at the beginning before #include "TimerInterrupt.h"
59+
// _TIMERINTERRUPT_LOGLEVEL_ from 0 to 4
60+
// Don't define _TIMERINTERRUPT_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
61+
#define TIMER_INTERRUPT_DEBUG 0
62+
#define _TIMERINTERRUPT_LOGLEVEL_ 0
6063

6164
#define USE_TIMER_1 true
6265
#define USE_TIMER_2 false

examples/ISR_Switch/ISR_Switch.ino

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
2323
or the entire sequence of your code which accesses the data.
2424
25-
Version: 1.1.2
25+
Version: 1.2.0
2626
2727
Version Modified By Date Comments
2828
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
3232
1.0.3 K.Hoang 01/12/2020 Add complex examples ISR_16_Timers_Array_Complex and ISR_16_Timers_Array_Complex
3333
1.1.1 K.Hoang 06/12/2020 Add example Change_Interval. Bump up version to sync with other TimerInterrupt Libraries
3434
1.1.2 K.Hoang 05/01/2021 Fix warnings. Optimize examples to reduce memory usage
35+
1.2.0 K.Hoang 07/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
3536
*****************************************************************************************************************************/
3637
/****************************************************************************************************************************
3738
ISR_Switch demontrates the use of ISR to avoid being blocked by other CPU-monopolizing task
@@ -67,8 +68,10 @@
6768
//#define BLYNK_DEBUG true
6869

6970
// These define's must be placed at the beginning before #include "TimerInterrupt.h"
70-
// Don't define TIMER_INTERRUPT_DEBUG > 0. Only for special ISR debugging only. Can hang the system.
71-
#define TIMER_INTERRUPT_DEBUG 0
71+
// _TIMERINTERRUPT_LOGLEVEL_ from 0 to 4
72+
// Don't define _TIMERINTERRUPT_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
73+
#define TIMER_INTERRUPT_DEBUG 0
74+
#define _TIMERINTERRUPT_LOGLEVEL_ 0
7275

7376
#define USE_TIMER_1 true
7477
#define USE_TIMER_2 false

examples/ISR_Timer_Complex/ISR_Timer_Complex.ino

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
2323
or the entire sequence of your code which accesses the data.
2424
25-
Version: 1.1.2
25+
Version: 1.2.0
2626
2727
Version Modified By Date Comments
2828
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
3232
1.0.3 K.Hoang 01/12/2020 Add complex examples ISR_16_Timers_Array_Complex and ISR_16_Timers_Array_Complex
3333
1.1.1 K.Hoang 06/12/2020 Add example Change_Interval. Bump up version to sync with other TimerInterrupt Libraries
3434
1.1.2 K.Hoang 05/01/2021 Fix warnings. Optimize examples to reduce memory usage
35+
1.2.0 K.Hoang 07/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
3536
*****************************************************************************************************************************/
3637

3738
/****************************************************************************************************************************
@@ -66,8 +67,10 @@
6667
//#define BLYNK_DEBUG true
6768

6869
// These define's must be placed at the beginning before #include "TimerInterrupt.h"
69-
// Don't define TIMER_INTERRUPT_DEBUG > 0. Only for special ISR debugging only. Can hang the system.
70-
#define TIMER_INTERRUPT_DEBUG 0
70+
// _TIMERINTERRUPT_LOGLEVEL_ from 0 to 4
71+
// Don't define _TIMERINTERRUPT_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
72+
#define TIMER_INTERRUPT_DEBUG 0
73+
#define _TIMERINTERRUPT_LOGLEVEL_ 0
7174

7275
#define USE_TIMER_1 true
7376
#define USE_TIMER_2 false

0 commit comments

Comments
 (0)