mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
component/bt: add DRAM_ATTR attribute to global variables(mainly bss segment) in bt.c which can be accessed in ISRs
This commit is contained in:
parent
1c4bbaa567
commit
29da5b2e17
@ -151,8 +151,8 @@ typedef struct {
|
|||||||
void *buffer;
|
void *buffer;
|
||||||
} btdm_queue_item_t;
|
} btdm_queue_item_t;
|
||||||
#define BTDM_MAX_QUEUE_NUM (5)
|
#define BTDM_MAX_QUEUE_NUM (5)
|
||||||
static btdm_queue_item_t btdm_queue_table[BTDM_MAX_QUEUE_NUM];
|
static DRAM_ATTR btdm_queue_item_t btdm_queue_table[BTDM_MAX_QUEUE_NUM];
|
||||||
SemaphoreHandle_t btdm_queue_table_mux = NULL;
|
static DRAM_ATTR SemaphoreHandle_t btdm_queue_table_mux = NULL;
|
||||||
#endif /* #if CONFIG_SPIRAM_USE_MALLOC */
|
#endif /* #if CONFIG_SPIRAM_USE_MALLOC */
|
||||||
|
|
||||||
struct osi_funcs_t {
|
struct osi_funcs_t {
|
||||||
@ -200,19 +200,19 @@ struct osi_funcs_t {
|
|||||||
|
|
||||||
/* Static variable declare */
|
/* Static variable declare */
|
||||||
// timestamp when PHY/RF was switched on
|
// timestamp when PHY/RF was switched on
|
||||||
static int64_t s_time_phy_rf_just_enabled = 0;
|
static DRAM_ATTR int64_t s_time_phy_rf_just_enabled = 0;
|
||||||
static esp_bt_controller_status_t btdm_controller_status = ESP_BT_CONTROLLER_STATUS_IDLE;
|
static DRAM_ATTR esp_bt_controller_status_t btdm_controller_status = ESP_BT_CONTROLLER_STATUS_IDLE;
|
||||||
|
|
||||||
static portMUX_TYPE global_int_mux = portMUX_INITIALIZER_UNLOCKED;
|
static DRAM_ATTR portMUX_TYPE global_int_mux = portMUX_INITIALIZER_UNLOCKED;
|
||||||
|
|
||||||
// measured average low power clock period in micro seconds
|
// measured average low power clock period in micro seconds
|
||||||
static uint32_t btdm_lpcycle_us = 0;
|
static DRAM_ATTR uint32_t btdm_lpcycle_us = 0;
|
||||||
static uint8_t btdm_lpcycle_us_frac = 0; // number of fractional bit for btdm_lpcycle_us
|
static DRAM_ATTR uint8_t btdm_lpcycle_us_frac = 0; // number of fractional bit for btdm_lpcycle_us
|
||||||
|
|
||||||
#ifdef CONFIG_PM_ENABLE
|
#ifdef CONFIG_PM_ENABLE
|
||||||
static esp_timer_handle_t s_btdm_slp_tmr;
|
static DRAM_ATTR esp_timer_handle_t s_btdm_slp_tmr;
|
||||||
static esp_pm_lock_handle_t s_pm_lock;
|
static DRAM_ATTR esp_pm_lock_handle_t s_pm_lock;
|
||||||
static QueueHandle_t s_pm_lock_sem = NULL;
|
static DRAM_ATTR QueueHandle_t s_pm_lock_sem = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline void btdm_check_and_init_bb(void)
|
static inline void btdm_check_and_init_bb(void)
|
||||||
@ -704,7 +704,7 @@ static void IRAM_ATTR btdm_slp_tmr_callback(void *arg)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct osi_funcs_t osi_funcs = {
|
static DRAM_ATTR struct osi_funcs_t osi_funcs = {
|
||||||
._set_isr = xt_set_interrupt_handler,
|
._set_isr = xt_set_interrupt_handler,
|
||||||
._ints_on = xt_ints_on,
|
._ints_on = xt_ints_on,
|
||||||
._interrupt_disable = interrupt_disable,
|
._interrupt_disable = interrupt_disable,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user