feat(ble): Support get ble controller free heap size on ESP32-H2

(cherry picked from commit 12f226be7d)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
This commit is contained in:
Zhao Wei Liang
2024-12-24 15:21:34 +08:00
parent c0d8e44cda
commit 9c0c5af372

View File

@ -388,6 +388,17 @@ static DRAM_ATTR esp_pm_lock_handle_t s_pm_lock = NULL;
#endif // CONFIG_PM_ENABLE
static DRAM_ATTR modem_clock_lpclk_src_t s_bt_lpclk_src = MODEM_CLOCK_LPCLK_SRC_INVALID;
#define BLE_CONTROLLER_MALLOC_CAPS (MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT|MALLOC_CAP_DMA)
void *malloc_ble_controller_mem(size_t size)
{
return heap_caps_malloc(size, BLE_CONTROLLER_MALLOC_CAPS);
}
uint32_t get_ble_controller_free_heap_size(void)
{
return heap_caps_get_free_size(BLE_CONTROLLER_MALLOC_CAPS);
}
#define BLE_RTC_DELAY_US_LIGHT_SLEEP (5100)
#define BLE_RTC_DELAY_US_MODEM_SLEEP (1500)