You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/03/29 08:14:40 UTC
(nuttx) 08/11: esp32s3/ble: Update the name of the interrupt status flags
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 62fbb7f03a7079e840a1ce57b83cb0a37b9da073
Author: Tiago Medicci Serrano <ti...@espressif.com>
AuthorDate: Mon Mar 18 17:57:43 2024 -0300
esp32s3/ble: Update the name of the interrupt status flags
In order to avoid confusion with other interrupt status flags used
by the system and the common source, rename it to be more specific.
---
arch/xtensa/src/esp32s3/esp32s3_ble_adapter.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/xtensa/src/esp32s3/esp32s3_ble_adapter.c b/arch/xtensa/src/esp32s3/esp32s3_ble_adapter.c
index e5078083c6..2e072443b5 100644
--- a/arch/xtensa/src/esp32s3/esp32s3_ble_adapter.c
+++ b/arch/xtensa/src/esp32s3/esp32s3_ble_adapter.c
@@ -454,11 +454,11 @@ static DRAM_ATTR void * g_light_sleep_pm_lock;
/* BT interrupt private data */
-static sq_queue_t g_int_flags_free;
+static sq_queue_t g_ble_int_flags_free;
-static sq_queue_t g_int_flags_used;
+static sq_queue_t g_ble_int_flags_used;
-static struct irqstate_list_s g_int_flags[NR_IRQSTATE_FLAGS];
+static struct irqstate_list_s g_ble_int_flags[NR_IRQSTATE_FLAGS];
/* Cached queue control variables */
@@ -823,13 +823,13 @@ static void IRAM_ATTR interrupt_disable(void)
{
struct irqstate_list_s *irqstate;
- irqstate = (struct irqstate_list_s *)sq_remlast(&g_int_flags_free);
+ irqstate = (struct irqstate_list_s *)sq_remlast(&g_ble_int_flags_free);
- DEBUGASSERT(irqstate != NULL);
+ ASSERT(irqstate != NULL);
irqstate->flags = enter_critical_section();
- sq_addlast((sq_entry_t *)irqstate, &g_int_flags_used);
+ sq_addlast((sq_entry_t *)irqstate, &g_ble_int_flags_used);
}
/****************************************************************************
@@ -851,13 +851,13 @@ static void IRAM_ATTR interrupt_restore(void)
{
struct irqstate_list_s *irqstate;
- irqstate = (struct irqstate_list_s *)sq_remlast(&g_int_flags_used);
+ irqstate = (struct irqstate_list_s *)sq_remlast(&g_ble_int_flags_used);
- DEBUGASSERT(irqstate != NULL);
+ ASSERT(irqstate != NULL);
leave_critical_section(irqstate->flags);
- sq_addlast((sq_entry_t *)irqstate, &g_int_flags_free);
+ sq_addlast((sq_entry_t *)irqstate, &g_ble_int_flags_free);
}
/****************************************************************************
@@ -2239,12 +2239,12 @@ int esp32s3_bt_controller_init(void)
bool set_div_ret;
int i;
- sq_init(&g_int_flags_free);
- sq_init(&g_int_flags_used);
+ sq_init(&g_ble_int_flags_free);
+ sq_init(&g_ble_int_flags_used);
for (i = 0; i < NR_IRQSTATE_FLAGS; i++)
{
- sq_addlast((sq_entry_t *)&g_int_flags[i], &g_int_flags_free);
+ sq_addlast((sq_entry_t *)&g_ble_int_flags[i], &g_ble_int_flags_free);
}
if (btdm_controller_status != ESP_BT_CONTROLLER_STATUS_IDLE)