add some macros needed by sys_mon module

This commit is contained in:
Gautier Hattenberger
2010-08-05 13:14:39 +00:00
parent daadd41302
commit 4edd6a7eee
2 changed files with 17 additions and 0 deletions
+1
View File
@@ -126,6 +126,7 @@ static inline void sys_time_init( void ) {
#define SEC_OF_SYS_TICS(st) (st / PCLK * T0_PCLK_DIV)
#define MSEC_OF_SYS_TICS(st) (st / (PCLK/1000) * T0_PCLK_DIV)
#define USEC_OF_SYS_TICS(st) (st / (PCLK/1000000) * T0_PCLK_DIV)
#define GET_CUR_TIME_FLOAT() ((float)cpu_time_sec + SEC_OF_SYS_TICS((float)cpu_time_ticks))
+16
View File
@@ -3,9 +3,25 @@
#include <unistd.h>
#define SYS_TICS_OF_SEC(x) (x)
#define SYS_TICS_OF_USEC(x) (x)
#define SYS_TICS_OF_NSEC(x) (x)
#define SIGNED_SYS_TICS_OF_SEC(x) (x)
#define SIGNED_SYS_TICS_OF_USEC(x) (x)
#define SEC_OF_SYS_TICS(st) (st)
#define MSEC_OF_SYS_TICS(st) (st)
#define USEC_OF_SYS_TICS(st) (st)
#define SysTimeChronoStart() { }
#define SysTimeChronoStop() { }
#define SysTimeChronoStartDisableIRQ() { }
#define SysTimeChronoStopEnableIRQAndSendUS(_tag) { }
#define SysTimeTimerStart(_t) { }
#define SysTimeTimer(_t) (_t)
#define SysTimeTimerStop(_t) { }
static inline void sys_time_init( void ) {}
#define sys_time_periodic() TRUE