Commit 8f46bade authored by me-no-dev's avatar me-no-dev
parent 21947ebe
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
#define HWTIMER_LOCK() portENTER_CRITICAL(timer->lock) #define HWTIMER_LOCK() portENTER_CRITICAL(timer->lock)
#define HWTIMER_UNLOCK() portEXIT_CRITICAL(timer->lock) #define HWTIMER_UNLOCK() portEXIT_CRITICAL(timer->lock)
typedef struct { typedef volatile struct {
union { union {
struct { struct {
uint32_t reserved0: 10; uint32_t reserved0: 10;
...@@ -272,6 +272,12 @@ void timerEnd(hw_timer_t *timer){ ...@@ -272,6 +272,12 @@ void timerEnd(hw_timer_t *timer){
} }
void timerAttachInterrupt(hw_timer_t *timer, void (*fn)(void), bool edge){ void timerAttachInterrupt(hw_timer_t *timer, void (*fn)(void), bool edge){
#if CONFIG_IDF_TARGET_ESP32
if(edge){
log_w("EDGE timer interrupt does not work properly on ESP32! Setting to LEVEL...");
edge = false;
}
#endif
static bool initialized = false; static bool initialized = false;
static intr_handle_t intr_handle = NULL; static intr_handle_t intr_handle = NULL;
if(intr_handle){ if(intr_handle){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment