Merge branch 'bufix/esp32c3_s3_build_err_v4.4' into 'release/v4.4'

component_bt: Fix ESP32C3/S3 build error after enable light sleep(v4.4)

See merge request espressif/esp-idf!17995
pull/8958/head
Jiang Jiang Jian 2022-05-13 15:39:38 +08:00
commit 80ea94dd36
2 zmienionych plików z 10 dodań i 18 usunięć

Wyświetl plik

@ -903,25 +903,21 @@ void esp_release_wifi_and_coex_mem(void)
ESP_ERROR_CHECK(try_heap_caps_add_region((intptr_t)ets_rom_layout_p->data_start_interface_coexist,(intptr_t)ets_rom_layout_p->bss_end_interface_pp));
}
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#if CONFIG_MAC_BB_PD
static void IRAM_ATTR btdm_mac_bb_power_down_cb(void)
{
if (s_lp_cntl.mac_bb_pd && s_lp_stat.mac_bb_pd == 0) {
#if (CONFIG_MAC_BB_PD)
btdm_ble_power_down_dma_copy(true);
#endif
s_lp_stat.mac_bb_pd = 1;
}
}
static void IRAM_ATTR btdm_mac_bb_power_up_cb(void)
{
#if (CONFIG_MAC_BB_PD)
if (s_lp_cntl.mac_bb_pd && s_lp_stat.mac_bb_pd) {
btdm_ble_power_down_dma_copy(false);
s_lp_stat.mac_bb_pd = 0;
}
#endif
}
#endif
@ -1009,7 +1005,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
s_lp_cntl.no_light_sleep = 1;
if (s_lp_cntl.enable) {
#if (CONFIG_MAC_BB_PD)
#if CONFIG_MAC_BB_PD
if (!btdm_deep_sleep_mem_init()) {
err = ESP_ERR_NO_MEM;
goto error;
@ -1054,7 +1050,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
ESP_LOGW(BTDM_LOG_TAG, "32.768kHz XTAL not detected, fall back to main XTAL as Bluetooth sleep clock\n"
"light sleep mode will not be able to apply when bluetooth is enabled");
}
#elif (CONFIG_BT_CTRL_LPCLK_SEL_RTC_SLOW)
#elif CONFIG_BT_CTRL_LPCLK_SEL_RTC_SLOW
// check whether or not EXT_CRYS is working
if (rtc_clk_slow_freq_get() == RTC_SLOW_FREQ_RTC) {
s_lp_cntl.lpclk_sel = BTDM_LPCLK_SEL_RTC_SLOW; // Internal 150 kHz RC oscillator
@ -1156,7 +1152,7 @@ error:
s_btdm_slp_tmr = NULL;
}
#if (CONFIG_MAC_BB_PD)
#if CONFIG_MAC_BB_PD
if (s_lp_cntl.mac_bb_pd) {
btdm_deep_sleep_mem_deinit();
s_lp_cntl.mac_bb_pd = 0;
@ -1202,7 +1198,7 @@ esp_err_t esp_bt_controller_deinit(void)
// deinit low power control resources
do {
#if (CONFIG_MAC_BB_PD)
#if CONFIG_MAC_BB_PD
btdm_deep_sleep_mem_deinit();
#endif

Wyświetl plik

@ -870,25 +870,21 @@ esp_err_t esp_bt_mem_release(esp_bt_mode_t mode)
return ESP_OK;
}
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#if CONFIG_MAC_BB_PD
static void IRAM_ATTR btdm_mac_bb_power_down_cb(void)
{
if (s_lp_cntl.mac_bb_pd && s_lp_stat.mac_bb_pd == 0) {
#if (CONFIG_MAC_BB_PD)
btdm_ble_power_down_dma_copy(true);
#endif
s_lp_stat.mac_bb_pd = 1;
}
}
static void IRAM_ATTR btdm_mac_bb_power_up_cb(void)
{
#if (CONFIG_MAC_BB_PD)
if (s_lp_cntl.mac_bb_pd && s_lp_stat.mac_bb_pd) {
btdm_ble_power_down_dma_copy(false);
s_lp_stat.mac_bb_pd = 0;
}
#endif
}
#endif
@ -976,7 +972,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
s_lp_cntl.no_light_sleep = 1;
if (s_lp_cntl.enable) {
#if (CONFIG_MAC_BB_PD)
#if CONFIG_MAC_BB_PD
if (!btdm_deep_sleep_mem_init()) {
err = ESP_ERR_NO_MEM;
goto error;
@ -1021,7 +1017,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
ESP_LOGW(BT_LOG_TAG, "32.768kHz XTAL not detected, fall back to main XTAL as Bluetooth sleep clock\n"
"light sleep mode will not be able to apply when bluetooth is enabled");
}
#elif (CONFIG_BT_CTRL_LPCLK_SEL_RTC_SLOW)
#elif CONFIG_BT_CTRL_LPCLK_SEL_RTC_SLOW
// check whether or not EXT_CRYS is working
if (rtc_clk_slow_freq_get() == RTC_SLOW_FREQ_RTC) {
s_lp_cntl.lpclk_sel = BTDM_LPCLK_SEL_RTC_SLOW; // Internal 150 kHz RC oscillator
@ -1123,7 +1119,7 @@ error:
s_btdm_slp_tmr = NULL;
}
#if (CONFIG_MAC_BB_PD)
#if CONFIG_MAC_BB_PD
if (s_lp_cntl.mac_bb_pd) {
btdm_deep_sleep_mem_deinit();
s_lp_cntl.mac_bb_pd = 0;
@ -1169,7 +1165,7 @@ esp_err_t esp_bt_controller_deinit(void)
// deinit low power control resources
do {
#if (CONFIG_MAC_BB_PD)
#if CONFIG_MAC_BB_PD
btdm_deep_sleep_mem_deinit();
#endif