diff --git a/platform/freertos/btstack_uart_block_freertos.c b/platform/freertos/btstack_uart_block_freertos.c index 9ba61fb89..ba6d5fe30 100644 --- a/platform/freertos/btstack_uart_block_freertos.c +++ b/platform/freertos/btstack_uart_block_freertos.c @@ -40,14 +40,14 @@ /* * btstack_uart_block_freertos.c * - * Adapter to IRQ-driven hal_uart_dma.h with FreeRTOS BTstack Run Loop and - * Callbacks are executed on main thread via data source and btstack_run_loop_freertos_trigger_from_isr + * Adapter to IRQ-driven hal_uart_dma.h with FreeRTOS BTstack Run Loop + * Callbacks are executed on main thread via data source and btstack_run_loop_poll_data_sources_from_irq * */ #include "btstack_debug.h" #include "btstack_uart_block.h" -#include "btstack_run_loop_freertos.h" +#include "btstack_run_loop.h" #include "hal_uart_dma.h" #ifdef HAVE_FREERTOS_INCLUDE_PREFIX @@ -56,12 +56,6 @@ #include "FreeRTOS.h" #endif -#if (INCLUDE_xEventGroupSetBitFromISR != 1) && !defined(HAVE_FREERTOS_TASK_NOTIFICATIONS) -#error "The BTstack HAL UART Run Loop integration (btstack_uart_block_freertos) needs to trigger Run Loop iterations from ISR context," \ -"but neither 'INCLUDE_xEventGroupSetBitFromISR' is enabled in your FreeRTOS configuration nor HAVE_FREERTOS_TASK_NOTIFICATIONS is enabled in " \ -"btstack_config.h. Please enable INCLUDE_xEventGroupSetBitFromISR or HAVE_FREERTOS_TASK_NOTIFICATIONS." -#endif - // uart config static const btstack_uart_config_t * uart_config; @@ -77,12 +71,12 @@ static int receive_complete; static void btstack_uart_block_freertos_received_isr(void){ receive_complete = 1; - btstack_run_loop_freertos_trigger_from_isr(); + btstack_run_loop_poll_data_sources_from_irq(); } static void btstack_uart_block_freertos_sent_isr(void){ send_complete = 1; - btstack_run_loop_freertos_trigger_from_isr(); + btstack_run_loop_poll_data_sources_from_irq(); } static void btstack_uart_block_freertos_process(btstack_data_source_t *ds, btstack_data_source_callback_type_t callback_type) {