Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b31c936

Browse filesBrowse files
authored
Add function timerAttachInterruptFlag (espressif#7809)
1 parent e881d11 commit b31c936
Copy full SHA for b31c936

File tree

2 files changed

+7
-2
lines changed
Filter options

2 files changed

+7
-2
lines changed

‎cores/esp32/esp32-hal-timer.c

Copy file name to clipboardExpand all lines: cores/esp32/esp32-hal-timer.c
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,15 @@ bool IRAM_ATTR timerFnWrapper(void *arg){
221221
return false;
222222
}
223223

224-
void timerAttachInterrupt(hw_timer_t *timer, void (*fn)(void), bool edge){
224+
void timerAttachInterruptFlag(hw_timer_t *timer, void (*fn)(void), bool edge, int intr_alloc_flags){
225225
if(edge){
226226
log_w("EDGE timer interrupt is not supported! Setting to LEVEL...");
227227
}
228-
timer_isr_callback_add(timer->group, timer->num, timerFnWrapper, fn, 0);
228+
timer_isr_callback_add(timer->group, timer->num, timerFnWrapper, fn, intr_alloc_flags);
229+
}
230+
231+
void timerAttachInterrupt(hw_timer_t *timer, void (*fn)(void), bool edge){
232+
timerAttachInterruptFlag(timer, fn, edge, 0);
229233
}
230234

231235
void timerDetachInterrupt(hw_timer_t *timer){

‎cores/esp32/esp32-hal-timer.h

Copy file name to clipboardExpand all lines: cores/esp32/esp32-hal-timer.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ void timerEnd(hw_timer_t *timer);
3636
void timerSetConfig(hw_timer_t *timer, uint32_t config);
3737
uint32_t timerGetConfig(hw_timer_t *timer);
3838

39+
void timerAttachInterruptFlag(hw_timer_t *timer, void (*fn)(void), bool edge, int intr_alloc_flags);
3940
void timerAttachInterrupt(hw_timer_t *timer, void (*fn)(void), bool edge);
4041
void timerDetachInterrupt(hw_timer_t *timer);
4142

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.