File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Original file line Diff line number Diff line change 47
#define HWTIMER_LOCK () portENTER_CRITICAL(timer->lock)
47
#define HWTIMER_LOCK () portENTER_CRITICAL(timer->lock)
48
#define HWTIMER_UNLOCK () portEXIT_CRITICAL(timer->lock)
48
#define HWTIMER_UNLOCK () portEXIT_CRITICAL(timer->lock)
49
49
50
- typedef struct {
50
+ typedef volatile struct {
51
union {
51
union {
52
struct {
52
struct {
53
uint32_t reserved0 : 10 ;
53
uint32_t reserved0 : 10 ;
@@ -272,6 +272,12 @@ void timerEnd(hw_timer_t *timer){
272
}
272
}
273
273
274
void timerAttachInterrupt (hw_timer_t * timer , void (* fn )(void ), bool edge ){
274
void timerAttachInterrupt (hw_timer_t * timer , void (* fn )(void ), bool edge ){
275
+ #if CONFIG_IDF_TARGET_ESP32
276
+ if (edge ){
277
+ log_w ("EDGE timer interrupt does not work properly on ESP32! Setting to LEVEL..." );
278
+ edge = false;
279
+ }
280
+ #endif
275
static bool initialized = false;
281
static bool initialized = false;
276
static intr_handle_t intr_handle = NULL ;
282
static intr_handle_t intr_handle = NULL ;
277
if (intr_handle ){
283
if (intr_handle ){
You can’t perform that action at this time.
0 commit comments