31 #ifndef SYS_TIME_ARCH_H
32 #define SYS_TIME_ARCH_H
45 #if (PCLK == 15000000)
48 #elif (PCLK == 30000000)
51 #elif (PCLK == 60000000)
55 #error unknown PCLK frequency
58 #ifndef TIMER0_VIC_SLOT
59 #define TIMER0_VIC_SLOT 1
82 #define SysTickTimerStart(_t) { _t = T0TC; }
83 #define SysTickTimer(_t) ((uint32_t)(T0TC - _t))
84 #define SysTickTimerStop(_t) { _t = (T0TC - _t); }
static uint32_t msec_of_cpu_ticks(uint32_t cpu_ticks)
static uint32_t usec_of_cpu_ticks(uint32_t cpu_ticks)
Architecture independent timing functions.
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
void sys_time_usleep(uint32_t us)
sys_time_usleep(uint32_t us)
uint32_t get_sys_time_msec(void)
static uint32_t cpu_ticks_of_usec(uint32_t usec)