intr_alloc: fix the issue intr_enable/disable cannot be used in ISR in

esp32s2beta.

This issue is reported in config freertos_compliance_s2.
This commit is contained in:
michael
2019-10-20 13:23:47 +08:00
parent 262ba6f825
commit 3d1ec3f451
2 changed files with 6 additions and 6 deletions

View File

@@ -858,7 +858,7 @@ esp_err_t IRAM_ATTR esp_intr_disable(intr_handle_t handle)
} else {
//Disable using per-cpu regs
if (handle->vector_desc->cpu!=xPortGetCoreID()) {
portEXIT_CRITICAL(&spinlock);
portEXIT_CRITICAL_SAFE(&spinlock);
return ESP_ERR_INVALID_ARG; //Can only enable these ints on this cpu
}
ESP_INTR_DISABLE(handle->vector_desc->intno);