esp32c3: reserve CPUINTs 5 and 8 for BLE

This commit is contained in:
Alan Carvalho de Assis 2023-02-02 16:10:55 -03:00 committed by Xiang Xiao
parent c12a60cb5a
commit e710ae5daf
1 changed files with 10 additions and 1 deletions

View File

@ -88,6 +88,14 @@
# define ESP32C3_WIFI_RESERVE_INT (1 << ESP32C3_CPUINT_ALWAYS_RSVD)
#endif
#ifdef CONFIG_ESP32C3_BLE
# define ESP32C3_BLE_RESERVE_INT ((1 << ESP32C3_CPUINT_ALWAYS_RSVD) | \
(1 << ESP32C3_CPUINT_BT_BB) | \
(1 << ESP32C3_CPUINT_RWBLE))
#else
# define ESP32C3_BLE_RESERVE_INT (1 << ESP32C3_CPUINT_ALWAYS_RSVD)
#endif
/****************************************************************************
* Private Data
****************************************************************************/
@ -103,7 +111,8 @@ static volatile uint8_t g_irqmap[NR_IRQS];
*/
static uint32_t g_cpu_freeints = ESP32C3_CPUINT_PERIPHSET &
(~ESP32C3_WIFI_RESERVE_INT);
(~ESP32C3_WIFI_RESERVE_INT &
~ESP32C3_BLE_RESERVE_INT);
/****************************************************************************
* Private Functions