From dad714c0fb39b97b9d79171788c14d40727d9b94 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 20 Apr 2017 17:36:22 +0200 Subject: [PATCH] esp32: don't use btstack_run_loop_freertos_single_threaded_execute_code_on_main_thread_from_isr anymore --- port/esp32/template/components/btstack/main.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/port/esp32/template/components/btstack/main.c b/port/esp32/template/components/btstack/main.c index d984bc6a7..0d6282992 100644 --- a/port/esp32/template/components/btstack/main.c +++ b/port/esp32/template/components/btstack/main.c @@ -109,16 +109,20 @@ void report_recv_called_from_isr(void){ printf("host_recv_pkt_cb called from ISR!\n"); } +void report_sent_called_from_isr(void){ + printf("host_send_pkt_available_cb called from ISR!\n"); +} + // run from VHCI Task static void host_send_pkt_available_cb(void){ if (xPortInIsrContext()){ - // notify upper stack that provided buffer can be used again - btstack_run_loop_freertos_single_threaded_execute_code_on_main_thread_from_isr(&transport_notify_packet_send, NULL); - } else { - // notify upper stack that provided buffer can be used again - btstack_run_loop_freertos_single_threaded_execute_code_on_main_thread(&transport_notify_packet_send, NULL); + report_sent_called_from_isr(); + return; } + + // notify upper stack that provided buffer can be used again + btstack_run_loop_freertos_single_threaded_execute_code_on_main_thread(&transport_notify_packet_send, NULL); } // run from VHCI Task