mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-27 21:40:15 +00:00
freertos: use portYIELD_FROM_ISR without arguments on esp32 and allow to compile of btstack_uart_block_freertos
This commit is contained in:
parent
233eb2b535
commit
297a0e053d
@ -152,7 +152,11 @@ void btstack_run_loop_freertos_trigger_from_isr(void){
|
||||
#ifdef HAVE_FREERTOS_TASK_NOTIFICATIONS
|
||||
xTaskNotifyFromISR(btstack_run_loop_task, EVENT_GROUP_FLAG_RUN_LOOP, eSetBits, &xHigherPriorityTaskWoken);
|
||||
if (xHigherPriorityTaskWoken) {
|
||||
#ifdef ESP_PLATFORM
|
||||
portYIELD_FROM_ISR();
|
||||
#else
|
||||
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
xEventGroupSetBitsFromISR(btstack_run_loop_event_group, EVENT_GROUP_FLAG_RUN_LOOP, &xHigherPriorityTaskWoken);
|
||||
|
@ -50,12 +50,10 @@
|
||||
#include "btstack_run_loop_freertos.h"
|
||||
#include "hal_uart_dma.h"
|
||||
|
||||
// hack to avoid error for ESP32
|
||||
#ifndef ESP_PLATFORM
|
||||
|
||||
#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 'INCLUDE_xEventGroupSetBitFromISR' is not enabled in your FreeRTOS configuration. Please enable INCLUDE_xEventGroupSetBitFromISR."
|
||||
"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
|
||||
@ -169,6 +167,3 @@ static const btstack_uart_block_t btstack_uart_block_freertos = {
|
||||
const btstack_uart_block_t * btstack_uart_block_freertos_instance(void){
|
||||
return &btstack_uart_block_freertos;
|
||||
}
|
||||
|
||||
// end of hack to avoid error for ESP32
|
||||
#endif // ESP_PLATFORM
|
||||
|
Loading…
x
Reference in New Issue
Block a user