#include <stddef.h>
#include "btstack_linked_list.h"
#include "btstack_debug.h"
#include "btstack_run_loop_freertos.h"
#include "hal_time_ms.h"
#include "FreeRTOS.h"
#include "queue.h"
#include "task.h"
#include "event_groups.h"
Data Structures | |
struct | function_call |
Macros | |
#define | __BTSTACK_FILE__ "btstack_run_loop_freertos.c" |
#define | ENABLE_LOG_DEBUG |
#define | EVENT_GROUP_FLAG_RUN_LOOP 1 |
Typedefs | |
typedef struct function_call | function_call_t |
Variables | |
static EventGroupHandle_t | btstack_run_loop_event_group |
static const btstack_run_loop_t | btstack_run_loop_freertos |
static QueueHandle_t | btstack_run_loop_queue |
static btstack_linked_list_t | data_sources |
static btstack_linked_list_t | timers |
#define __BTSTACK_FILE__ "btstack_run_loop_freertos.c" |
#define ENABLE_LOG_DEBUG |
#define EVENT_GROUP_FLAG_RUN_LOOP 1 |
Referenced by btstack_run_loop_freertos_execute(), and btstack_run_loop_freertos_trigger().
typedef struct function_call function_call_t |
|
static |
References btstack_linked_list_add().
|
static |
Add timer to run_loop (keep list sorted)
References btstack_timer_source::item, log_error, btstack_linked_item::next, and btstack_timer_source::timeout.
|
static |
References btstack_data_source::flags.
|
static |
References log_info, btstack_linked_item::next, and btstack_timer_source::timeout.
|
static |
References btstack_data_source::flags.
|
static |
Execute run_loop.
References function_call::arg, btstack_run_loop_event_group, btstack_run_loop_freertos_get_time_ms(), btstack_run_loop_freertos_remove_timer(), btstack_run_loop_queue, DATA_SOURCE_CALLBACK_POLL, EVENT_GROUP_FLAG_RUN_LOOP, btstack_data_source::flags, function_call::fn, if(), btstack_data_source::item, log_debug, btstack_linked_item::next, NULL, pdFALSE, pdMS_TO_TICKS, btstack_data_source::process, btstack_timer_source::process, btstack_timer_source::timeout, xEventGroupWaitBits(), xQueueReceive, and xTaskNotifyWait().
void btstack_run_loop_freertos_execute_code_on_main_thread | ( | void(*)(void *arg) | fn, |
void * | arg | ||
) |
const btstack_run_loop_t* btstack_run_loop_freertos_get_instance | ( | void | ) |
Provide btstack_run_loop_posix instance for use with btstack_run_loop_init.
Provide btstack_run_loop_freertos instance for use with btstack_run_loop_init.
References btstack_run_loop_freertos.
|
static |
References hal_time_ms().
Referenced by btstack_run_loop_freertos_execute(), and btstack_run_loop_freertos_set_timer().
|
static |
References btstack_run_loop_event_group, btstack_run_loop_queue, log_info, NULL, xEventGroupCreate(), and xQueueCreate.
|
static |
References btstack_linked_list_remove().
|
static |
Remove timer from run loop.
References btstack_linked_list_remove().
Referenced by btstack_run_loop_freertos_execute().
|
static |
References btstack_run_loop_freertos_get_time_ms(), and btstack_timer_source::timeout.
void btstack_run_loop_freertos_trigger | ( | void | ) |
Triggers processing of data sources from thread context.
Has to be called after enabling a poll data source to wake-pup run loop.
References btstack_run_loop_event_group, btstack_run_loop_task, eSetBits, EVENT_GROUP_FLAG_RUN_LOOP, xEventGroupSetBits(), and xTaskNotify.
Referenced by btstack_run_loop_freertos_execute_code_on_main_thread().
|
static |
|
static |
Referenced by btstack_run_loop_freertos_get_instance().
|
static |
|
static |
|
static |