2009-11-06 10:04:15 +01:00
|
|
|
#ifndef __CLOCK_H__
|
|
|
|
#define __CLOCK_H__
|
|
|
|
|
|
|
|
#include "kernel.h"
|
2010-04-02 00:22:33 +02:00
|
|
|
#include "arch_clock.h"
|
2009-11-06 10:04:15 +01:00
|
|
|
|
2012-03-24 16:16:34 +01:00
|
|
|
int boot_cpu_init_timer(unsigned freq);
|
|
|
|
int app_cpu_init_timer(unsigned freq);
|
2009-11-06 10:04:15 +01:00
|
|
|
|
2012-03-24 16:16:34 +01:00
|
|
|
int timer_int_handler(void);
|
2009-11-06 10:04:15 +01:00
|
|
|
|
2012-03-24 16:16:34 +01:00
|
|
|
int init_local_timer(unsigned freq);
|
2010-09-15 16:10:57 +02:00
|
|
|
/* sto p the local timer ticking */
|
2012-03-24 16:16:34 +01:00
|
|
|
void stop_local_timer(void);
|
2010-09-15 16:10:57 +02:00
|
|
|
/* let the time tick again with the original settings after it was stopped */
|
2012-03-24 16:16:34 +01:00
|
|
|
void restart_local_timer(void);
|
|
|
|
int register_local_timer_handler(irq_handler_t handler);
|
2009-11-06 10:04:15 +01:00
|
|
|
|
2012-03-24 16:16:34 +01:00
|
|
|
u64_t ms_2_cpu_time(unsigned ms);
|
|
|
|
unsigned cpu_time_2_ms(u64_t cpu_time);
|
2010-05-25 10:06:14 +02:00
|
|
|
|
2009-11-06 10:04:15 +01:00
|
|
|
#endif /* __CLOCK_H__ */
|