11 #ifndef TIME_KEEPER_H_
12 #define TIME_KEEPER_H_
17 #define TK_AST_FREQUENCY 1000000 // timer ticks per second (32 bit timer, >1h time-out at 1MHz, >years at 1kHz. We'll go for precision here...)
18 #define AST_PRESCALER_SETTING 5 // log(SOURCE_CLOCK/AST_FREQ)/log(2)-1 . when running from PBA (64Mhz), 5 (1Mhz), or 15 (~1khz, not precisely though).
20 void time_keeper_init(
void);
23 double time_keeper_get_time(
void);
25 uint32_t time_keeper_get_millis(
void);
26 uint32_t time_keeper_get_micros(
void);
28 uint32_t time_keeper_get_time_ticks(
void);
30 float time_keeper_ticks_to_seconds(uint32_t timer_ticks);