mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-01 09:08:06 +00:00
btstack_run_loop_freertos: implement poll_data_sources_from_irq
This commit is contained in:
parent
d338410556
commit
4fd33db703
@ -142,7 +142,7 @@ void btstack_run_loop_freertos_execute_code_on_main_thread(void (*fn)(void *arg)
|
||||
}
|
||||
|
||||
#if defined(HAVE_FREERTOS_TASK_NOTIFICATIONS) || (INCLUDE_xEventGroupSetBitFromISR == 1)
|
||||
void btstack_run_loop_freertos_trigger_from_isr(void){
|
||||
static void btstack_run_loop_freertos_poll_data_sources_from_irq(void){
|
||||
BaseType_t xHigherPriorityTaskWoken;
|
||||
#ifdef HAVE_FREERTOS_TASK_NOTIFICATIONS
|
||||
xTaskNotifyFromISR(btstack_run_loop_task, EVENT_GROUP_FLAG_RUN_LOOP, eSetBits, &xHigherPriorityTaskWoken);
|
||||
@ -157,6 +157,9 @@ void btstack_run_loop_freertos_trigger_from_isr(void){
|
||||
xEventGroupSetBitsFromISR(btstack_run_loop_event_group, EVENT_GROUP_FLAG_RUN_LOOP, &xHigherPriorityTaskWoken);
|
||||
#endif
|
||||
}
|
||||
void btstack_run_loop_freertos_trigger_from_isr(void){
|
||||
btstack_run_loop_freertos_trigger_from_isr();
|
||||
}
|
||||
#endif
|
||||
|
||||
void btstack_run_loop_freertos_trigger_exit(void){
|
||||
@ -246,6 +249,11 @@ static const btstack_run_loop_t btstack_run_loop_freertos = {
|
||||
&btstack_run_loop_freertos_execute,
|
||||
&btstack_run_loop_base_dump_timer,
|
||||
&btstack_run_loop_freertos_get_time_ms,
|
||||
#if defined(HAVE_FREERTOS_TASK_NOTIFICATIONS) || (INCLUDE_xEventGroupSetBitFromISR == 1)
|
||||
&btstack_run_loop_freertos_poll_data_sources_from_irq,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
};
|
||||
|
||||
const btstack_run_loop_t * btstack_run_loop_freertos_get_instance(void){
|
||||
|
@ -70,6 +70,7 @@ void btstack_run_loop_freertos_trigger(void);
|
||||
/**
|
||||
* @brief Triggers processing of data sources from an ISR.
|
||||
* Has to be called after enabling a poll data source to wake-pup run loop.
|
||||
* @deprecated Please use btstack_run_loop_poll_data_sources_from_irq() instead
|
||||
*/
|
||||
void btstack_run_loop_freertos_trigger_from_isr(void);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user