29 #endif // ENABLE_TC_TIME 33 #define RTPRES_SEC (CHIP_FREQ_MCK/8) // MCK/8 36 #define RTPRES_SEC BOARD_FREQ_SLCK_XTAL 37 #define RTPRES 3 // finest allowed granularity 38 #endif // ENABLE_TC_TIME 40 #define TIME_TICKS_PER_SEC (RTPRES_SEC/RTPRES) 41 #define TIME_TICKS_PER_MS (TIME_TICKS_PER_SEC/1000) 42 #define TIME_TICKS_PER_US (TIME_TICKS_PER_SEC/1000000) 44 #define TIME_SECS_PER_TICK_LF (((double)RTPRES)/(double)RTPRES_SEC) 45 #define TIME_MS_PER_TICK_LF (TIME_SECS_PER_TICK_LF*1000.0) 46 #define TIME_US_PER_TICK_LF (TIME_SECS_PER_TICK_LF*1000000.0) 48 #define TIME_SECS_PER_TICK_F (((float)RTPRES)/(float)RTPRES_SEC) 49 #define TIME_MS_PER_TICK_F (TIME_SECS_PER_TICK_F*1000.0f) 50 #define TIME_US_PER_TICK_F (TIME_SECS_PER_TICK_F*1000000.0f)
void time_delay(uint32_t ms)
volatile uint64_t time_ticks(void)