From 3c55548a6e2997028a44b3759a74637b810a300a Mon Sep 17 00:00:00 2001 From: devyte Date: Thu, 8 Feb 2018 12:14:13 -0300 Subject: [PATCH] Changed TIM_DIV265 for deprecation --- cores/esp8266/Arduino.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/cores/esp8266/Arduino.h b/cores/esp8266/Arduino.h index b5621e42cd..5424d3baf3 100644 --- a/cores/esp8266/Arduino.h +++ b/cores/esp8266/Arduino.h @@ -85,9 +85,13 @@ extern "C" { #define EXTERNAL 0 //timer dividers -#define TIM_DIV1 0 //80MHz (80 ticks/us - 104857.588 us max) -#define TIM_DIV16 1 //5MHz (5 ticks/us - 1677721.4 us max) -#define TIM_DIV265 3 //312.5Khz (1 tick = 3.2us - 26843542.4 us max) +enum TIM_DIV_ENUM { + TIM_DIV1 = 0, //80MHz (80 ticks/us - 104857.588 us max) + TIM_DIV16 = 1, //5MHz (5 ticks/us - 1677721.4 us max) + TIM_DIV256 = 3 //312.5Khz (1 tick = 3.2us - 26843542.4 us max) +}; + + //timer int_types #define TIM_EDGE 0 #define TIM_LEVEL 1 @@ -236,7 +240,17 @@ void optimistic_yield(uint32_t interval_us); } // extern "C" #endif + +//for compatibility, below 4 lines to be removed in release 3.0.0 #ifdef __cplusplus +extern "C" +#endif +const int TIM_DIV265 __attribute__((deprecated, weak)) = TIM_DIV256; + + + +#ifdef __cplusplus + #include #include "pgmspace.h"