mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 03:07:21 +02:00
esp32/rtc_module: Fixed critical section API
Application used to abort as portENTER_CRITICAL is used in ISR. portENTER_CRITICAL is changed to portENTER_CRITICAL_SAFE in touch_pad_clear_status() https://github.com/aws/amazon-freertos/issues/1651
This commit is contained in:
@ -774,9 +774,9 @@ uint32_t IRAM_ATTR touch_pad_get_status()
|
|||||||
|
|
||||||
esp_err_t IRAM_ATTR touch_pad_clear_status()
|
esp_err_t IRAM_ATTR touch_pad_clear_status()
|
||||||
{
|
{
|
||||||
portENTER_CRITICAL(&rtc_spinlock);
|
portENTER_CRITICAL_SAFE(&rtc_spinlock);
|
||||||
SENS.sar_touch_ctrl2.touch_meas_en_clr = 1;
|
SENS.sar_touch_ctrl2.touch_meas_en_clr = 1;
|
||||||
portEXIT_CRITICAL(&rtc_spinlock);
|
portEXIT_CRITICAL_SAFE(&rtc_spinlock);
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user