Lines Matching refs:s_lp_cntl

421 static DRAM_ATTR btdm_lpcntl_t s_lp_cntl;  variable
774 if (s_lp_cntl.wakeup_timer_required == 0) { in btdm_sleep_enter_phase1_wrapper()
848 if (s_lp_cntl.wakeup_timer_required && s_lp_stat.wakeup_timer_started) { in btdm_sleep_exit_phase3_wrapper()
862 assert(s_lp_cntl.enable == 1); in btdm_sleep_exit_phase0()
876 if (s_lp_cntl.wakeup_timer_required && s_lp_stat.wakeup_timer_started) { in btdm_sleep_exit_phase0()
896 if (s_lp_cntl.enable == 0) { in async_wakeup_request()
922 if (s_lp_cntl.wakeup_timer_required && s_lp_stat.wakeup_timer_started) { in async_wakeup_request()
936 if (s_lp_cntl.enable == 0) { in async_wakeup_request_end()
1214 if (s_lp_cntl.mac_bb_pd && s_lp_stat.mac_bb_pd == 0) { in btdm_mac_bb_power_down_cb()
1222 if (s_lp_cntl.mac_bb_pd && s_lp_stat.mac_bb_pd) { in btdm_mac_bb_power_up_cb()
1237 s_lp_cntl.val = 0; in btdm_low_power_mode_init()
1238 s_lp_cntl.main_xtal_pu = 0; in btdm_low_power_mode_init()
1243 s_lp_cntl.enable = (cfg->sleep_mode == ESP_BT_SLEEP_MODE_1) ? 1 : 0; in btdm_low_power_mode_init()
1244s_lp_cntl.lpclk_sel = (cfg->sleep_mode == ESP_BT_SLEEP_MODE_1) ? cfg->sleep_clock : ESP_BT_SLEEP_C… in btdm_low_power_mode_init()
1245 s_lp_cntl.no_light_sleep = 0; in btdm_low_power_mode_init()
1247 if (s_lp_cntl.enable) { in btdm_low_power_mode_init()
1253 s_lp_cntl.mac_bb_pd = 1; in btdm_low_power_mode_init()
1256 s_lp_cntl.wakeup_timer_required = 1; in btdm_low_power_mode_init()
1266 if (s_lp_cntl.wakeup_timer_required) { in btdm_low_power_mode_init()
1281 if (s_lp_cntl.lpclk_sel == ESP_BT_SLEEP_CLOCK_EXT_32K_XTAL) { // External 32 kHz XTAL in btdm_low_power_mode_init()
1285 s_lp_cntl.lpclk_sel = ESP_BT_SLEEP_CLOCK_MAIN_XTAL; in btdm_low_power_mode_init()
1287 s_lp_cntl.no_light_sleep = 1; in btdm_low_power_mode_init()
1290 … } else if (s_lp_cntl.lpclk_sel == ESP_BT_SLEEP_CLOCK_RTC_SLOW) { // Internal 136kHz RC oscillator in btdm_low_power_mode_init()
1298 } else if (s_lp_cntl.lpclk_sel == ESP_BT_SLEEP_CLOCK_MAIN_XTAL) { in btdm_low_power_mode_init()
1301 s_lp_cntl.no_light_sleep = 1; in btdm_low_power_mode_init()
1305 s_lp_cntl.no_light_sleep = 1; in btdm_low_power_mode_init()
1310 if (s_lp_cntl.lpclk_sel == ESP_BT_SLEEP_CLOCK_MAIN_XTAL) { in btdm_low_power_mode_init()
1313 s_lp_cntl.main_xtal_pu = 1; in btdm_low_power_mode_init()
1320 } else if (s_lp_cntl.lpclk_sel == ESP_BT_SLEEP_CLOCK_EXT_32K_XTAL) { in btdm_low_power_mode_init()
1328 } else if (s_lp_cntl.lpclk_sel == ESP_BT_SLEEP_CLOCK_RTC_SLOW) { in btdm_low_power_mode_init()
1343 if (s_lp_cntl.no_light_sleep) { in btdm_low_power_mode_init()
1367 return s_lp_cntl.lpclk_sel; in esp_bt_get_lpclk_src()
1486 if (s_lp_cntl.mac_bb_pd) { in btdm_low_power_mode_deinit()
1488 s_lp_cntl.mac_bb_pd = 0; in btdm_low_power_mode_deinit()
1493 if (s_lp_cntl.no_light_sleep) { in btdm_low_power_mode_deinit()
1507 if (s_lp_cntl.wakeup_timer_required && s_btdm_slp_tmr != NULL) { in btdm_low_power_mode_deinit()
1516 if (s_lp_cntl.enable) { in btdm_low_power_mode_deinit()
1524 if (s_lp_cntl.lpclk_sel == ESP_BT_SLEEP_CLOCK_MAIN_XTAL) { in btdm_low_power_mode_deinit()
1526 if (s_lp_cntl.main_xtal_pu) { in btdm_low_power_mode_deinit()
1528 s_lp_cntl.main_xtal_pu = 0; in btdm_low_power_mode_deinit()
1588 if (s_lp_cntl.no_light_sleep) { in esp_bt_controller_enable()
1607 if (s_lp_cntl.enable) { in esp_bt_controller_enable()
1636 if (s_lp_cntl.no_light_sleep) { in esp_bt_controller_enable()
1686 if (s_lp_cntl.no_light_sleep) { in esp_bt_controller_disable()