feat(ble): provide isr dispatch method option for ble log ts

This commit is contained in:
Zhou Xiao
2025-12-30 17:28:58 +08:00
parent 195cee4eff
commit 4ef76fcb76
3 changed files with 17 additions and 1 deletions

View File

@@ -132,7 +132,6 @@ if BLE_LOG_ENABLED
config BLE_LOG_TS_TRIGGER_ESP_TIMER
bool "BLE Log Timestamp Synchronization trigger - ESP Timer"
select ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD
help
ESP Timer based periodic TS trigger
@@ -141,6 +140,15 @@ if BLE_LOG_ENABLED
help
Task Event based TS trigger (Light Sleep Test Compatibility)
endchoice
config BLE_LOG_TS_TRIGGER_ESP_TIMER_ISR_DISPATCH_METHOD
bool "Utilize ISR dispatch method for ESP Timer as Timestamp Synchronization trigger"
default n
select ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD
select GPIO_CTRL_FUNC_IN_IRAM
depends on BLE_LOG_TS_TRIGGER_ESP_TIMER
help
Utilize ISR dispatch method for ESP Timer as Timestamp Synchronization trigger
endif
choice BLE_LOG_PRPH_CHOICE

View File

@@ -76,6 +76,9 @@ BLE_LOG_IRAM_ATTR BLE_LOG_STATIC void ble_log_rt_task(void *pvParameters)
}
#if CONFIG_BLE_LOG_TS_ENABLED
#if CONFIG_BLE_LOG_TS_TRIGGER_ESP_TIMER_ISR_DISPATCH_METHOD
BLE_LOG_IRAM_ATTR
#endif /* CONFIG_BLE_LOG_TS_TRIGGER_ESP_TIMER_ISR_DISPATCH_METHOD */
BLE_LOG_STATIC void ble_log_rt_ts_trigger(void *arg)
{
(void)arg;
@@ -117,7 +120,9 @@ bool ble_log_rt_init(void)
esp_timer_create_args_t ts_timer_args = {
.callback = ble_log_rt_ts_trigger,
.arg = NULL,
#if CONFIG_BLE_LOG_TS_TRIGGER_ESP_TIMER_ISR_DISPATCH_METHOD
.dispatch_method = ESP_TIMER_ISR,
#endif /* CONFIG_BLE_LOG_TS_TRIGGER_ESP_TIMER_ISR_DISPATCH_METHOD */
.name = "ble_log_ts_timer",
};
if (esp_timer_create(&ts_timer_args, &rt_ts_timer) != ESP_OK) {

View File

@@ -61,6 +61,9 @@ void ble_log_ts_deinit(void)
gpio_reset_pin(CONFIG_BLE_LOG_SYNC_IO_NUM);
}
#if CONFIG_BLE_LOG_TS_TRIGGER_ESP_TIMER_ISR_DISPATCH_METHOD
BLE_LOG_IRAM_ATTR
#endif /* CONFIG_BLE_LOG_TS_TRIGGER_ESP_TIMER_ISR_DISPATCH_METHOD */
void ble_log_ts_info_update(ble_log_ts_info_t **info)
{
if (!ts_inited) {