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 void sys_time_usleep(uint32_t us)
Busy wait, in microseconds.
static uint32_t usec_of_cpu_ticks(uint32_t cpu_ticks)
Architecture independent timing functions.
static uint32_t get_sys_time_msec(void)
Get the time in milliseconds since startup.
static uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
static uint32_t cpu_ticks_of_usec(uint32_t usec)