mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-03 23:47:08 +00:00
btstack_run_loop_windows: implement trigger exit
This commit is contained in:
parent
90d4f18637
commit
82b879d843
@ -55,6 +55,7 @@
|
||||
// start time.
|
||||
static ULARGE_INTEGER start_time;
|
||||
|
||||
static bool run_loop_exit_requested;
|
||||
|
||||
/**
|
||||
* @brief Queries the current time in ms since start
|
||||
@ -139,6 +140,10 @@ static void btstack_run_loop_windows_execute(void) {
|
||||
}
|
||||
}
|
||||
|
||||
static void btstack_run_loop_windows_trigger_exit(void){
|
||||
run_loop_exit_requested = true;
|
||||
}
|
||||
|
||||
// set timer
|
||||
static void btstack_run_loop_windows_set_timer(btstack_timer_source_t *a, uint32_t timeout_in_ms){
|
||||
uint32_t time_ms = btstack_run_loop_windows_get_time_ms();
|
||||
@ -173,6 +178,9 @@ static const btstack_run_loop_t btstack_run_loop_windows = {
|
||||
&btstack_run_loop_windows_execute,
|
||||
&btstack_run_loop_base_dump_timer,
|
||||
&btstack_run_loop_windows_get_time_ms,
|
||||
NULL, /* poll data sources from irq */
|
||||
NULL,
|
||||
btstack_run_loop_windows_trigger_exit
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user