Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added correct TIM_DIV256, changed TIM_DIV265 for deprecation #4326

Merged
merged 1 commit into from
Feb 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions cores/esp8266/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 <algorithm>
#include "pgmspace.h"

Expand Down