mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-24 01:20:23 +00:00
component/bt: implement bluetooth modem sleep mode, one mode for BLE only and another for dual mode bluetooth
1. provide options for bluetooth low power mode 2. provide two options for bluetooth low power clock: main XTAL and external 32kHz XTAL 3. provide function and callbacks to control bluetooth low power mode, including enable/disable sleep, software wakeup request, low power clock settings, check power state, etc 4. modify vhci API vhci_host_send_packet to use blocking mode 5. note that DFS and bluetooth modem sleep can not be used together currently.
This commit is contained in:
@@ -114,6 +114,10 @@ static uint32_t get_clk_en_mask(periph_module_t periph)
|
||||
return DPORT_WIFI_CLK_BT_EN_M;
|
||||
case PERIPH_WIFI_BT_COMMON_MODULE:
|
||||
return DPORT_WIFI_CLK_WIFI_BT_COMMON_M;
|
||||
case PERIPH_BT_BASEBAND_MODULE:
|
||||
return DPORT_BT_BASEBAND_EN;
|
||||
case PERIPH_BT_LC_MODULE:
|
||||
return DPORT_BT_LC_EN;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
@@ -177,6 +181,8 @@ static uint32_t get_rst_en_mask(periph_module_t periph)
|
||||
case PERIPH_WIFI_MODULE:
|
||||
case PERIPH_BT_MODULE:
|
||||
case PERIPH_WIFI_BT_COMMON_MODULE:
|
||||
case PERIPH_BT_BASEBAND_MODULE:
|
||||
case PERIPH_BT_LC_MODULE:
|
||||
return 0;
|
||||
default:
|
||||
return 0;
|
||||
@@ -195,6 +201,8 @@ static bool is_wifi_clk_peripheral(periph_module_t periph)
|
||||
case PERIPH_WIFI_MODULE:
|
||||
case PERIPH_BT_MODULE:
|
||||
case PERIPH_WIFI_BT_COMMON_MODULE:
|
||||
case PERIPH_BT_BASEBAND_MODULE:
|
||||
case PERIPH_BT_LC_MODULE:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user