esp-idf/components/bt
wangmengyang 086b36d737 Refactor Bluetooth sleep mechanism
Refactor bluetooth hardware PowerUp/PowerDown functions

component/bt: fix use of a deprecated MACRO "CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE"

component/bt: fix sleep wakeup in controller disable procedure

remove use of s_pm_lock_sem

1. Modified the waking up approach from async to sync: post a message to controller task upon vhci downstream packets or controller disable, and in response, controller task goes through the wake-up procedure
2. Added Controller status check for the esp_vhci APIs
3. Adjust the procedure during controller_init, check the validity of arguments first

Some minor modifications for bluetooth sleep control and configuration

1. use variable flag s_btdm_allow_light_sleep to control the use of s_light_sleep_pm_lock
2. use variable btdm_lpclk_sel to choose bluetooth sleep clock, support only for external 32kHz crystal temporarily

component/bt: improve async_wakeup function

1. check power state first and then decide if wakeup needs to be performed
2. change the meaning of the return value, if wakeup request is posted to controller task, then return true, otherwise return false

put sleep control logics in controller init/deinit/enable/disable together

Use s_lp_cntl struct: replace bool-typed variable sleep_backup_en with s_lp_cntl.mac_bb_pd

Use s_lp_cntl struct: replace bool-typed variable s_btdm_allow_light_sleep with s_lp_cntl.no_light_sleep

Use s_lp_cntl struct: replace global variable btdm_lpclk_sel with s_lp_cntl.lpclk_sel

create semaphore s_wakeup_req_sem only when low power mode is required

Use s_lp_cntl struct: use s_lp_cntl.wakeup_timer_required to control the wakeup timer

use s_lp_stat to replace original state variable sleep_backup_done and s_pm_lock_acquired

one minor change for mac_bb_pd settings init: return error status if memeory allocation failed
2021-01-28 19:23:09 +08:00
..
common component/bt: add BLE v5.0 feature for bluedroid host 2021-01-15 17:55:12 +08:00
controller Refactor Bluetooth sleep mechanism 2021-01-28 19:23:09 +08:00
esp_ble_mesh Merge branch 'bugfix/ble_mesh_proxy_client_net_resend' into 'master' 2021-01-20 19:21:16 +08:00
host Update bt_discovery demo and README 2021-01-27 14:17:12 +08:00
include Update bt_discovery demo and README 2021-01-27 14:17:12 +08:00
test cmock: added cmock as component 2020-09-02 16:38:37 +08:00
CMakeLists.txt Merge branch 'nimble/update_nimble-1.3.0-idf' into 'master' 2021-01-18 20:29:10 +08:00
component.mk Merge branch 'nimble/update_nimble-1.3.0-idf' into 'master' 2021-01-18 20:29:10 +08:00
Kconfig NimBLE: BLE 5.0 related configuration changes 2021-01-19 17:02:56 +05:30
linker.lf esp_common: Fix issue with SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY not visible on c3 2020-12-31 15:20:05 +11:00
sdkconfig.rename component/bt: add BLE v5.0 feature for bluedroid host 2021-01-15 17:55:12 +08:00