mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-18 19:21:54 +00:00
btstack_run_loop: assert callbacks for timer and data source are set
This commit is contained in:
parent
8691a66c78
commit
0ad702f3bc
@ -94,6 +94,7 @@ void btstack_run_loop_disable_data_source_callbacks(btstack_data_source_t *ds, u
|
||||
void btstack_run_loop_add_data_source(btstack_data_source_t *ds){
|
||||
btstack_assert(the_run_loop != NULL);
|
||||
btstack_assert(the_run_loop->enable_data_source_callbacks != NULL);
|
||||
btstack_assert(ds->process != NULL);
|
||||
the_run_loop->add_data_source(ds);
|
||||
}
|
||||
|
||||
@ -102,7 +103,8 @@ void btstack_run_loop_add_data_source(btstack_data_source_t *ds){
|
||||
*/
|
||||
int btstack_run_loop_remove_data_source(btstack_data_source_t *ds){
|
||||
btstack_assert(the_run_loop != NULL);
|
||||
btstack_assert(the_run_loop->enable_data_source_callbacks != NULL);
|
||||
btstack_assert(the_run_loop->disable_data_source_callbacks != NULL);
|
||||
btstack_assert(ds->process != NULL);
|
||||
return the_run_loop->remove_data_source(ds);
|
||||
}
|
||||
|
||||
@ -130,6 +132,7 @@ void * btstack_run_loop_get_timer_context(btstack_timer_source_t *ts){
|
||||
*/
|
||||
void btstack_run_loop_add_timer(btstack_timer_source_t *ts){
|
||||
btstack_assert(the_run_loop != NULL);
|
||||
btstack_assert(ts->process != NULL);
|
||||
the_run_loop->add_timer(ts);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user