mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-23 09:41:03 +00:00
added embedded_get_time_ms(void)
This commit is contained in:
parent
5bb5bc3ed8
commit
8304b81b86
@ -108,6 +108,8 @@ void run_loop_execute(void);
|
|||||||
uint32_t embedded_ticks_for_ms(uint32_t time_in_ms);
|
uint32_t embedded_ticks_for_ms(uint32_t time_in_ms);
|
||||||
// Queries the current time in ticks.
|
// Queries the current time in ticks.
|
||||||
uint32_t embedded_get_ticks(void);
|
uint32_t embedded_get_ticks(void);
|
||||||
|
// Queries the current time in ms
|
||||||
|
uint32_t embedded_get_time_ms(void);
|
||||||
// Allows to update BTstack system ticks based on another already existing clock
|
// Allows to update BTstack system ticks based on another already existing clock
|
||||||
void embedded_set_ticks(uint32_t ticks);
|
void embedded_set_ticks(uint32_t ticks);
|
||||||
#endif
|
#endif
|
||||||
|
@ -204,6 +204,11 @@ void embedded_set_ticks(uint32_t ticks){
|
|||||||
uint32_t embedded_ticks_for_ms(uint32_t time_in_ms){
|
uint32_t embedded_ticks_for_ms(uint32_t time_in_ms){
|
||||||
return time_in_ms / hal_tick_get_tick_period_in_ms();
|
return time_in_ms / hal_tick_get_tick_period_in_ms();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t embedded_get_time_ms(void){
|
||||||
|
return system_ticks * hal_tick_get_tick_period_in_ms();
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user