mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-23 11:43:24 +00:00
btstack_run_loop: support uint64_t timer variable
btstack_run_loop: cleanup whitespaces
This commit is contained in:
parent
6a3524cf57
commit
e8cbad6015
@ -119,7 +119,7 @@ void btstack_run_loop_base_dump_timer(void){
|
||||
uint16_t i = 0;
|
||||
for (it = (btstack_linked_item_t *) btstack_run_loop_base_timers; it ; it = it->next){
|
||||
btstack_timer_source_t * timer = (btstack_timer_source_t*) it;
|
||||
log_info("timer %u (%p): timeout %" PRIu32 "u\n", i, (void *) timer, timer->timeout);
|
||||
log_info("timer %u (%p): timeout %" PRIbtstack_time_t "\n", i, (void *) timer, timer->timeout);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -56,6 +56,14 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef ENABLE_TESTING_SUPPORT
|
||||
typedef uint64_t btstack_time_t;
|
||||
#define PRIbtstack_time_t PRIu64
|
||||
#else
|
||||
typedef uint32_t btstack_time_t;
|
||||
#define PRIbtstack_time_t PRIu32
|
||||
#endif
|
||||
|
||||
#if defined __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -92,7 +100,7 @@ typedef struct btstack_data_source {
|
||||
typedef struct btstack_timer_source {
|
||||
btstack_linked_item_t item;
|
||||
// timeout in system ticks (HAVE_EMBEDDED_TICK) or milliseconds (HAVE_EMBEDDED_TIME_MS)
|
||||
uint32_t timeout;
|
||||
btstack_time_t timeout;
|
||||
// will be called when timer fired
|
||||
void (*process)(struct btstack_timer_source *ts);
|
||||
void * context;
|
||||
|
Loading…
x
Reference in New Issue
Block a user