diff --git a/components/bt/controller/lib_esp32h4/esp32h4-bt-lib b/components/bt/controller/lib_esp32h4/esp32h4-bt-lib index 09b1bc34cec..82575012899 160000 --- a/components/bt/controller/lib_esp32h4/esp32h4-bt-lib +++ b/components/bt/controller/lib_esp32h4/esp32h4-bt-lib @@ -1 +1 @@ -Subproject commit 09b1bc34cec46e256a96242803e855caddac9f05 +Subproject commit 82575012899f240829f8d5f06b602b717866d469 diff --git a/components/bt/controller/lib_esp32s31/esp32s31-bt-lib b/components/bt/controller/lib_esp32s31/esp32s31-bt-lib index 589a3a2bde3..0a0fbbec195 160000 --- a/components/bt/controller/lib_esp32s31/esp32s31-bt-lib +++ b/components/bt/controller/lib_esp32s31/esp32s31-bt-lib @@ -1 +1 @@ -Subproject commit 589a3a2bde35208800652c3379204a65062bfc56 +Subproject commit 0a0fbbec19518f9a3af8f699049b9d1b285bd2cf diff --git a/components/bt/porting_btdm/transport/include/esp_hci_driver.h b/components/bt/porting_btdm/transport/include/esp_hci_driver.h index 7f8586e8efb..ff7a6e9e9fa 100644 --- a/components/bt/porting_btdm/transport/include/esp_hci_driver.h +++ b/components/bt/porting_btdm/transport/include/esp_hci_driver.h @@ -106,10 +106,39 @@ extern hci_driver_ops_t hci_driver_vhci_ops; #endif // UC_BT_CTRL_HCI_INTERFACE_USE_RAM #if UC_BT_CTRL_HCI_INTERFACE_USE_UART -extern hci_driver_ops_t hci_driver_uart_ops; #if UC_BT_CTRL_UART_HCI_DMA_MODE extern hci_driver_ops_t hci_driver_uart_dma_ops; -#endif // UC_BT_CTRL_UART_HCI_DMA_MODE +/** + * @brief Reconfigure the UART pins for the HCI driver. + * + * This function changes the UART pin configuration for the HCI driver. + * + * @param tx_pin The pin number for the UART TX (transmit) line. + * @param rx_pin The pin number for the UART RX (receive) line. + * @param cts_pin The pin number for the UART CTS (clear to send) line. + * @param rts_pin The pin number for the UART RTS (request to send) line. + * + * @return int Returns 0 on success, or a negative error code on failure. + */ +int hci_driver_uart_dma_reconfig_pin(int tx_pin, int rx_pin, int cts_pin, int rts_pin); +#define hci_uart_reconfig_pin hci_driver_uart_dma_reconfig_pin +#else +extern hci_driver_ops_t hci_driver_uart_ops; +/** + * @brief Reconfigure the UART pins for the HCI driver. + * + * This function changes the UART pin configuration for the HCI driver. + * + * @param tx_pin The pin number for the UART TX (transmit) line. + * @param rx_pin The pin number for the UART RX (receive) line. + * @param cts_pin The pin number for the UART CTS (clear to send) line. + * @param rts_pin The pin number for the UART RTS (request to send) line. + * + * @return int Returns 0 on success, or a negative error code on failure. + */ +int hci_driver_uart_reconfig_pin(int tx_pin, int rx_pin, int cts_pin, int rts_pin); +#define hci_uart_reconfig_pin hci_driver_uart_reconfig_pin +#endif // CONFIG_BT_LE_UART_HCI_DMA_MODE #endif // UC_BT_CTRL_HCI_INTERFACE_USE_UART #endif // H_ESP_HCI_DRIVER_ diff --git a/examples/bluetooth/nimble/power_save/main/main.c b/examples/bluetooth/nimble/power_save/main/main.c index 331db9171e8..1f85cb4bf83 100644 --- a/examples/bluetooth/nimble/power_save/main/main.c +++ b/examples/bluetooth/nimble/power_save/main/main.c @@ -16,6 +16,7 @@ #include "console/console.h" #include "services/gap/ble_svc_gap.h" #include "bleprph.h" +#include "soc/rtc.h" #if CONFIG_EXAMPLE_EXTENDED_ADV static uint8_t ext_adv_pattern_1[] = { @@ -574,7 +575,7 @@ app_main(void) // automatic light sleep is enabled if tickless idle support is enabled. esp_pm_config_t pm_config = { .max_freq_mhz = CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ, - .min_freq_mhz = CONFIG_XTAL_FREQ, + .min_freq_mhz = rtc_clk_xtal_freq_get(), #if CONFIG_FREERTOS_USE_TICKLESS_IDLE .light_sleep_enable = true #endif