mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/timer_spinlock_iram_v4.3' into 'release/v4.3'
timer: add IRAM_ATTR to spinlock give/take API (v4.3) See merge request espressif/esp-idf!13511
This commit is contained in:
commit
c7a10f9293
@ -474,14 +474,14 @@ bool IRAM_ATTR timer_group_get_auto_reload_in_isr(timer_group_t group_num, timer
|
||||
return timer_hal_get_auto_reload(&(p_timer_obj[group_num][timer_num]->hal));
|
||||
}
|
||||
|
||||
esp_err_t timer_spinlock_take(timer_group_t group_num)
|
||||
esp_err_t IRAM_ATTR timer_spinlock_take(timer_group_t group_num)
|
||||
{
|
||||
TIMER_CHECK(group_num < TIMER_GROUP_MAX, TIMER_GROUP_NUM_ERROR, ESP_ERR_INVALID_ARG);
|
||||
TIMER_ENTER_CRITICAL(&timer_spinlock[group_num]);
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t timer_spinlock_give(timer_group_t group_num)
|
||||
esp_err_t IRAM_ATTR timer_spinlock_give(timer_group_t group_num)
|
||||
{
|
||||
TIMER_CHECK(group_num < TIMER_GROUP_MAX, TIMER_GROUP_NUM_ERROR, ESP_ERR_INVALID_ARG);
|
||||
TIMER_EXIT_CRITICAL(&timer_spinlock[group_num]);
|
||||
|
Loading…
Reference in New Issue
Block a user