You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 29, 2023. It is now read-only.
### Releases v1.3.0
1. Fix `multiple-definitions` linker error. Drop `src_cpp` and `src_h` directories
2. Add example [multiFileProject](examples/multiFileProject) to demo for multiple-file project.
3. Optimize library code by using `reference-passing` instead of `value-passing`
4. Update all examples
*[1. ISR_16_Timers_Array on Teensy 4.1](#1-isr_16_timers_array-on-teensy-41)
@@ -66,7 +68,6 @@
66
68
*[5. ISR_16_Timers_Array_Complex on Teensy 4.1](#5-isr_16_timers_array_complex-on-teensy-41)
67
69
*[Debug](#debug)
68
70
*[Troubleshooting](#troubleshooting)
69
-
*[Releases](#releases)
70
71
*[Issues](#issues)
71
72
*[TO DO](#to-do)
72
73
*[DONE](#done)
@@ -78,6 +79,10 @@
78
79
---
79
80
---
80
81
82
+
### Important Change from v1.3.0
83
+
84
+
Please have a look at [HOWTO Fix `Multiple Definitions` Linker Error](#howto-fix-multiple-definitions-linker-error)
85
+
81
86
### Why do we need this [Teensy_TimerInterrupt library](https://github.com/khoih-prog/Teensy_TimerInterrupt)
82
87
83
88
### Features
@@ -129,7 +134,7 @@ The catch is **your function is now part of an ISR (Interrupt Service Routine),
129
134
130
135
1.**Teensy boards** such as :
131
136
132
-
-**Teensy 4.1, 4.0**
137
+
-**Teensy 4.1, 4.0, Teensy MicroMod**
133
138
-**Teensy 3.6, 3.5, 3.2/3.1, 3.0**
134
139
-**Teensy LC**
135
140
-**Teensy++ 2.0 and Teensy 2.0**
@@ -145,37 +150,13 @@ The catch is **your function is now part of an ISR (Interrupt Service Routine),
145
150
---
146
151
---
147
152
148
-
## Changelog
149
-
150
-
### Releases v1.2.0
151
-
152
-
1. Add better debug feature.
153
-
2. Optimize code and examples to reduce RAM usage
154
-
3. Add Table of Contents
155
-
156
-
### Releases v1.1.1
157
-
158
-
1. Add example [**Change_Interval**](examples/Change_Interval) and [**ISR_16_Timers_Array_Complex**](examples/ISR_16_Timers_Array_Complex)
159
-
2. Bump up version to sync with other TimerInterrupt Libraries. Modify Version String.
160
-
161
-
### Releases v1.0.1
162
-
163
-
1. Add complicated example [ISR_16_Timers_Array](examples/ISR_16_Timers_Array) utilizing and demonstrating the full usage of 16 independent ISR Timers.
164
-
165
-
### Releases v1.0.0
166
-
167
-
1. Permit up to 16 super-long-time, super-accurate ISR-based timers to avoid being blocked
168
-
2. Using cpp code besides Impl.h code to use if Multiple-Definition linker error.
169
-
170
-
---
171
-
---
172
153
173
154
## Prerequisites
174
155
175
-
1.[`Arduino IDE 1.8.13+` for Arduino](https://www.arduino.cc/en/Main/Software)
176
-
2.[`Teensy Core 1.53+`](https://www.pjrc.com/teensy/td_download.html) for Teensy.
156
+
1.[`Arduino IDE 1.8.19+` for Arduino](https://github.com/arduino/Arduino). [](https://github.com/arduino/Arduino/releases/latest)
157
+
2.[`Teensy Core 1.56+`](https://www.pjrc.com/teensy/td_download.html) for Teensy.
177
158
3. To use with certain example,
178
-
-[`SimpleTimer library`](https://github.com/schinken/SimpleTimer) for [ISR_16_Timers_Array example](examples/ISR_16_Timers_Array).
159
+
-[`SimpleTimer library`](https://github.com/jfturcot/SimpleTimer) for [ISR_16_Timers_Array example](examples/ISR_16_Timers_Array).
179
160
180
161
---
181
162
---
@@ -210,18 +191,20 @@ Another way to install is to:
210
191
211
192
#### 1. For Teensy boards
212
193
213
-
**To be able to compile and run on Teensy boards**, you have to copy the file [Teensy boards.txt](Packages_Patches/hardware/teensy/avr/boards.txt) into Teensy hardware directory (./arduino-1.8.13/hardware/teensy/avr/boards.txt).
194
+
**To be able to compile and run on Teensy boards**, you have to copy the file [Teensy boards.txt](Packages_Patches/hardware/teensy/avr/boards.txt) into Teensy hardware directory (./arduino-1.8.19/hardware/teensy/avr/boards.txt).
214
195
215
-
Supposing the Arduino version is 1.8.13. This file must be copied into the directory:
196
+
Supposing the Arduino version is 1.8.19. These files must be copied into the directory:
@@ -298,24 +281,28 @@ To add UDP Multicast support, necessary for the [**UPnP_Generic library**](https
298
281
299
282
### HOWTO Fix `Multiple Definitions` Linker Error
300
283
301
-
The current library implementation, using **xyz-Impl.h instead of standard xyz.cpp**, possibly creates certain `Multiple Definitions` Linker error in certain use cases. Although it's simple to just modify several lines of code, either in the library or in the application, the library is adding 2 more source directories
284
+
The current library implementation, using `xyz-Impl.h` instead of standard `xyz.cpp`, possibly creates certain `Multiple Definitions` Linker error in certain use cases.
302
285
303
-
1.**scr_h** for new h-only files
304
-
2.**src_cpp** for standard h/cpp files
286
+
You can include `.hpp`
287
+
288
+
```
289
+
// Can be included as many times as necessary, without `Multiple Definitions` Linker Error
To use the **old standard cpp** way, locate this library' directory, then just
296
+
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
309
297
310
-
1.**Delete the all the files in src directory.**
311
-
2.**Copy all the files in src_cpp directory into src.**
312
-
3. Close then reopen the application code in Arduino IDE, etc. to recompile from scratch.
298
+
```
299
+
// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
@@ -874,11 +864,12 @@ While software timer, **programmed for 2s, is activated after 10.000s in loop()!
874
864
In this example, 16 independent ISR Timers are used and utilized just one Hardware Timer. The Timer Intervals and Function Pointers are stored in arrays to facilitate the code modification.
[TISR] Request interval = 1000, actual interval (us) = 999
872
+
[TISR] Prescale = 2, _timerCount = 18750
882
873
Starting ITimer OK, millis() = 1241
883
874
1s: Delta ms = 1000, ms = 2241
884
875
1s: Delta ms = 1000, ms = 3241
@@ -948,11 +939,12 @@ simpleTimerDoingSomething2s: Delta programmed ms = 2000, actual = 10000
948
939
The following is the sample terminal output when running example [**TimerInterruptTest**](examples/TimerInterruptTest) on **Teensy 4.1** to demonstrate how to start/stop and the accuracy of Hardware Timers.
The following is the sample terminal output when running example [**Argument_None**](examples/Argument_None) on **Teensy4.1** to demonstrate the accuracy of Hardware Timers.
The following is the sample terminal output when running example [Change_Interval](examples/Change_Interval) on **Teensy4.1** to demonstrate how to change Timer Interval on-the-fly
1040
1033
1041
1034
```
1042
-
Starting Change_Interval on Teensy 4.0/4.1
1043
-
Teensy_TimerInterrupt v1.2.0
1035
+
Starting Change_Interval on Teensy 4.1
1036
+
TeensyTimerInterrupt v1.3.0
1044
1037
CPU Frequency = 600 MHz
1038
+
[TISR] TEENSY_TIMER_1: F_BUS_ACTUAL (MHz) = 150
1039
+
[TISR] Request interval = 10000, actual interval (us) = 9999
1040
+
[TISR] Prescale = 5, _timerCount = 23437
1045
1041
Starting ITimer OK, millis() = 1432
1046
1042
Time = 10001, TimerCount = 857
1047
1043
Time = 20002, TimerCount = 1857
@@ -1071,11 +1067,12 @@ While software timer, **programmed for 2s, is activated after 10.000s in loop()!
1071
1067
In this example, 16 independent ISR Timers are used, yet utilized just one Hardware Timer. The Timer Intervals and Function Pointers are stored in arrays to facilitate the code modification.
1072
1068
1073
1069
```
1074
-
Starting ISR_16_Timers_Array_Complex on Teensy 4.0/4.1
1075
-
Teensy_TimerInterrupt v1.1.1
1070
+
Starting ISR_16_Timers_Array_Complex on Teensy 4.1
[TISR] Request interval = 10000, actual interval (us) = 9999
1075
+
[TISR] Prescale = 5, _timerCount = 23437
1079
1076
Starting ITimer OK, millis() = 1247
1080
1077
SimpleTimer : 2s, ms = 11247, Dms : 10000
1081
1078
Timer : 0, programmed : 5000, actual : 5000
@@ -1242,39 +1239,6 @@ Sometimes, the library will only work if you update the board core to the latest
1242
1239
---
1243
1240
---
1244
1241
1245
-
## Releases
1246
-
1247
-
### Releases v1.2.0
1248
-
1249
-
1. Add better debug feature.
1250
-
2. Optimize code and examples to reduce RAM usage
1251
-
3. Add Table of Contents
1252
-
1253
-
### Releases v1.1.1
1254
-
1255
-
1. Add example [**Change_Interval**](examples/Change_Interval) and [**ISR_16_Timers_Array_Complex**](examples/ISR_16_Timers_Array_Complex)
1256
-
2. Bump up version to sync with other TimerInterrupt Libraries. Modify Version String.
1257
-
1258
-
### Releases v1.0.1
1259
-
1260
-
1. Add complicated example [ISR_16_Timers_Array](examples/ISR_16_Timers_Array) utilizing and demonstrating the full usage of 16 independent ISR Timers.
1261
-
1262
-
### Releases v1.0.0
1263
-
1264
-
1. Permit up to 16 super-long-time, super-accurate ISR-based timers to avoid being blocked
1265
-
2. Using cpp code besides Impl.h code to use if Multiple-Definition linker error.
1266
-
1267
-
#### Supported Boards
1268
-
1269
-
1.**Teensy boards** such as :
1270
-
1271
-
-**Teensy 4.1, 4.0**
1272
-
-**Teensy 3.6, 3.5, 3.2/3.1, 3.0**
1273
-
-**Teensy LC**
1274
-
-**Teensy++ 2.0 and Teensy 2.0**
1275
-
1276
-
---
1277
-
---
1278
1242
1279
1243
### Issues
1280
1244
@@ -1296,6 +1260,8 @@ Submit issues to: [Teensy_TimerInterrupt issues](https://github.com/khoih-prog/T
1296
1260
3. Longer time interval
1297
1261
4. Similar features for remaining Arduino boards such as AVR, ESP32, ESP8266, STM32, SAM-DUE, SAMD21/SAMD51, mbed-nRF52, nRF52, etc.
1298
1262
5. Add Table of Contents
1263
+
6. Fix `multiple-definitions` linker error
1264
+
7. Optimize library code by using `reference-passing` instead of `value-passing`
1. Fix `multiple-definitions` linker error. Drop `src_cpp` and `src_h` directories
29
+
2. Add example [multiFileProject](examples/multiFileProject) to demo for multiple-file project.
30
+
3. Optimize library code by using `reference-passing` instead of `value-passing`
31
+
4. Update all examples
32
+
33
+
### Releases v1.2.0
34
+
35
+
1. Add better debug feature.
36
+
2. Optimize code and examples to reduce RAM usage
37
+
3. Add Table of Contents
38
+
39
+
### Releases v1.1.1
40
+
41
+
1. Add example [**Change_Interval**](examples/Change_Interval) and [**ISR_16_Timers_Array_Complex**](examples/ISR_16_Timers_Array_Complex)
42
+
2. Bump up version to sync with other TimerInterrupt Libraries. Modify Version String.
43
+
44
+
### Releases v1.0.1
45
+
46
+
1. Add complicated example [ISR_16_Timers_Array](examples/ISR_16_Timers_Array) utilizing and demonstrating the full usage of 16 independent ISR Timers.
47
+
48
+
### Releases v1.0.0
49
+
50
+
1. Permit up to 16 super-long-time, super-accurate ISR-based timers to avoid being blocked
51
+
2. Using cpp code besides Impl.h code to use if Multiple-Definition linker error.
0 commit comments