mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
add some macros needed by sys_mon module
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user