File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -85,9 +85,13 @@ extern "C" {
8585#define EXTERNAL 0
8686
8787// 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+
9195// timer int_types
9296#define TIM_EDGE 0
9397#define TIM_LEVEL 1
@@ -236,7 +240,17 @@ void optimistic_yield(uint32_t interval_us);
236240} // extern "C"
237241#endif
238242
243+
244+ // for compatibility, below 4 lines to be removed in release 3.0.0
239245#ifdef __cplusplus
246+ extern " C"
247+ #endif
248+ const int TIM_DIV265 __attribute__ ((deprecated, weak)) = TIM_DIV256;
249+
250+
251+
252+ #ifdef __cplusplus
253+
240254#include < algorithm>
241255#include " pgmspace.h"
242256
You can’t perform that action at this time.
0 commit comments