forked from espressif/esp-idf
Merge branch 'change/reduce_usage_of_iram_when_bt_in_single_mode_v4.4' into 'release/v4.4'
change(bt/bluedroid): Redirect app functions in controller based on the bluetooth mode(backport v4.4) See merge request espressif/esp-idf!29227
This commit is contained in:
@@ -88,7 +88,7 @@ do{\
|
|||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
#define OSI_FUNCS_TIME_BLOCKING 0xffffffff
|
#define OSI_FUNCS_TIME_BLOCKING 0xffffffff
|
||||||
#define OSI_VERSION 0x00010004
|
#define OSI_VERSION 0x00010005
|
||||||
#define OSI_MAGIC_VALUE 0xFADEBEAD
|
#define OSI_MAGIC_VALUE 0xFADEBEAD
|
||||||
|
|
||||||
/* Types definition
|
/* Types definition
|
||||||
@@ -176,6 +176,7 @@ struct osi_funcs_t {
|
|||||||
void (*_interrupt_l3_restore)(void);
|
void (*_interrupt_l3_restore)(void);
|
||||||
void *(* _customer_queue_create)(uint32_t queue_len, uint32_t item_size);
|
void *(* _customer_queue_create)(uint32_t queue_len, uint32_t item_size);
|
||||||
int (* _coex_version_get)(unsigned int *major, unsigned int *minor, unsigned int *patch);
|
int (* _coex_version_get)(unsigned int *major, unsigned int *minor, unsigned int *patch);
|
||||||
|
void (* _patch_apply)(void);
|
||||||
uint32_t _magic;
|
uint32_t _magic;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -257,6 +258,10 @@ extern uint32_t _nimble_data_end;
|
|||||||
extern uint32_t _btdm_data_start;
|
extern uint32_t _btdm_data_start;
|
||||||
extern uint32_t _btdm_data_end;
|
extern uint32_t _btdm_data_end;
|
||||||
|
|
||||||
|
extern void config_bt_funcs_reset(void);
|
||||||
|
extern void config_ble_funcs_reset(void);
|
||||||
|
extern void config_btdm_funcs_reset(void);
|
||||||
|
|
||||||
/* Local Function Declare
|
/* Local Function Declare
|
||||||
*********************************************************************
|
*********************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -329,6 +334,7 @@ static void *customer_queue_create_hlevel_wrapper(uint32_t queue_len, uint32_t i
|
|||||||
static void IRAM_ATTR interrupt_l3_disable(void);
|
static void IRAM_ATTR interrupt_l3_disable(void);
|
||||||
static void IRAM_ATTR interrupt_l3_restore(void);
|
static void IRAM_ATTR interrupt_l3_restore(void);
|
||||||
static void bt_controller_deinit_internal(void);
|
static void bt_controller_deinit_internal(void);
|
||||||
|
static void patch_apply(void);
|
||||||
|
|
||||||
/* Local variable definition
|
/* Local variable definition
|
||||||
***************************************************************************
|
***************************************************************************
|
||||||
@@ -416,6 +422,7 @@ static const struct osi_funcs_t osi_funcs_ro = {
|
|||||||
._customer_queue_create = NULL,
|
._customer_queue_create = NULL,
|
||||||
#endif /* CONFIG_BTDM_CTRL_HLI */
|
#endif /* CONFIG_BTDM_CTRL_HLI */
|
||||||
._coex_version_get = coex_version_get_wrapper,
|
._coex_version_get = coex_version_get_wrapper,
|
||||||
|
._patch_apply = patch_apply,
|
||||||
._magic = OSI_MAGIC_VALUE,
|
._magic = OSI_MAGIC_VALUE,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1698,6 +1705,18 @@ static void bt_shutdown(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void patch_apply(void)
|
||||||
|
{
|
||||||
|
config_btdm_funcs_reset();
|
||||||
|
|
||||||
|
#ifndef CONFIG_BTDM_CTRL_MODE_BLE_ONLY
|
||||||
|
config_bt_funcs_reset();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY
|
||||||
|
config_ble_funcs_reset();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
|
esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
|
||||||
{
|
{
|
||||||
|
Submodule components/bt/controller/lib_esp32 updated: e43c9b121f...e42401b2e3
Reference in New Issue
Block a user