File tree 1 file changed +17
-3
lines changed
1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -85,9 +85,13 @@ extern "C" {
85
85
#define EXTERNAL 0
86
86
87
87
// timer dividers
88
- #define TIM_DIV1 0 // 80MHz (80 ticks/us - 104857.588 us max)
89
- #define TIM_DIV16 1 // 5MHz (5 ticks/us - 1677721.4 us max)
90
- #define TIM_DIV265 3 // 312.5Khz (1 tick = 3.2us - 26843542.4 us max)
88
+ enum TIM_DIV_ENUM {
89
+ TIM_DIV1 = 0 , // 80MHz (80 ticks/us - 104857.588 us max)
90
+ TIM_DIV16 = 1 , // 5MHz (5 ticks/us - 1677721.4 us max)
91
+ TIM_DIV256 = 3 // 312.5Khz (1 tick = 3.2us - 26843542.4 us max)
92
+ };
93
+
94
+
91
95
// timer int_types
92
96
#define TIM_EDGE 0
93
97
#define TIM_LEVEL 1
@@ -236,7 +240,17 @@ void optimistic_yield(uint32_t interval_us);
236
240
} // extern "C"
237
241
#endif
238
242
243
+
244
+ // for compatibility, below 4 lines to be removed in release 3.0.0
239
245
#ifdef __cplusplus
246
+ extern " C"
247
+ #endif
248
+ const int TIM_DIV265 __attribute__ ((deprecated, weak)) = TIM_DIV256;
249
+
250
+
251
+
252
+ #ifdef __cplusplus
253
+
240
254
#include < algorithm>
241
255
#include " pgmspace.h"
242
256
You can’t perform that action at this time.
0 commit comments