feat(ble): support enhanced controller log capabilities on ESP32-C2

(cherry picked from commit bbcb4a2e1f)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
This commit is contained in:
Zhou Xiao
2025-02-18 10:22:55 +08:00
parent 1479cbd40e
commit f08f52d057
2 changed files with 28 additions and 0 deletions

View File

@@ -435,6 +435,21 @@ void esp_ble_controller_log_dump_all(bool output)
portEXIT_CRITICAL_SAFE(&spinlock);
}
}
#if CONFIG_BT_LE_CONTROLLER_LOG_TASK_WDT_USER_HANDLER_ENABLE
void esp_task_wdt_isr_user_handler(void)
{
esp_ble_controller_log_dump_all(true);
}
#endif // CONFIG_BT_LE_CONTROLLER_LOG_TASK_WDT_USER_HANDLER_ENABLE
#if CONFIG_BT_LE_CONTROLLER_LOG_WRAP_PANIC_HANDLER_ENABLE
void __real_esp_panic_handler(void *info);
void __wrap_esp_panic_handler (void *info)
{
esp_ble_controller_log_dump_all(true);
__real_esp_panic_handler(info);
}
#endif // CONFIG_BT_LE_CONTROLLER_LOG_WRAP_PANIC_HANDLER_ENABLE
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
/* This variable tells if BLE is running */