esp32: sanity check ISR handler address passed into esp_intr_alloc

Return ESP_ERR_INVALID_ARG if the handler is not in IRAM (or RTC fast memory)
This commit is contained in:
Ivan Grokhotkov
2017-01-11 01:14:18 +08:00
parent 833102cbf3
commit a2e0c2432e
4 changed files with 41 additions and 3 deletions

View File

@@ -124,6 +124,9 @@ esp_err_t esp_intr_reserve(int intno, int cpu);
*
* The interrupt will always be allocated on the core that runs this function.
*
* If ESP_INTR_FLAG_IRAM flag is used, and handler address is not in IRAM or
* RTC_FAST_MEM, then ESP_ERR_INVALID_ARG is returned.
*
* @param source The interrupt source. One of the ETS_*_INTR_SOURCE interrupt mux
* sources, as defined in soc/soc.h, or one of the internal
* ETS_INTERNAL_*_INTR_SOURCE sources as defined in this header.
@@ -264,4 +267,4 @@ void esp_intr_noniram_enable();
}
#endif
#endif
#endif