Go to the documentation of this file.
43 #if (CH_CFG_ST_TIMEDELTA < 0) || (CH_CFG_ST_TIMEDELTA == 1)
44 #error "invalid CH_CFG_ST_TIMEDELTA specified, must " \
45 "be zero or greater than one"
48 #if (CH_CFG_ST_TIMEDELTA > 0) && (CH_CFG_TIME_QUANTUM > 0)
49 #error "CH_CFG_TIME_QUANTUM not supported in tickless mode"
52 #if (CH_CFG_ST_TIMEDELTA > 0) && (CH_DBG_THREADS_PROFILING == TRUE)
53 #error "CH_DBG_THREADS_PROFILING not supported in tickless mode"
81 #if CH_CFG_USE_TIMESTAMP == TRUE
124 #if CH_CFG_ST_TIMEDELTA == 0
127 return port_timer_get_time();
222 if (dlp == dlp->
next) {
227 #if CH_CFG_ST_TIMEDELTA == 0
458 #if (CH_CFG_USE_TIMESTAMP == TRUE) || defined(__DOXYGEN__)
514 #if CH_CFG_ST_TIMEDELTA == 0
519 #if CH_CFG_USE_TIMESTAMP == TRUE
static void chVTSetI(virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
Enables a one-shot virtual timer.
void chVTDoTickI(void)
Virtual timers ticker.
static void chVTResetTimeStamp(void)
Resets and re-synchronizes the time stamps monotonic counter.
ch_delta_list_t dlist
Delta list element.
systimestamp_t chVTGetTimeStampI(void)
Generates a monotonic time stamp.
#define chTimeDiffX(start, end)
Subtracts two system times returning an interval.
#define currcore
Access to current core's instance structure.
static systime_t chVTGetSystemTimeX(void)
Current system time.
static bool chVTIsArmedI(const virtual_timer_t *vtp)
Returns true if the specified timer is armed.
static void chVTObjectInit(virtual_timer_t *vtp)
Initializes a virtual_timer_t object.
uint64_t systime_t
Type of system time.
void(* vtfunc_t)(virtual_timer_t *vtp, void *p)
Type of a Virtual Timer callback function.
void chVTResetTimeStampI(void)
Resets and re-synchronizes the time stamps monotonic counter.
static systimestamp_t chVTGetTimeStamp(void)
Generates a monotonic time stamp.
sysinterval_t chVTGetRemainingIntervalI(virtual_timer_t *vtp)
Returns the remaining time interval before next timer trigger.
uint64_t systimestamp_t
Type of a time stamp.
static bool chVTGetTimersStateI(sysinterval_t *timep)
Returns the time interval until the next timer event.
static bool chVTIsSystemTimeWithin(systime_t start, systime_t end)
Checks if the current system time is within the specified time window.
static void chVTSetReloadIntervalX(virtual_timer_t *vtp, sysinterval_t reload)
Changes a timer reload time interval.
ch_delta_list_t dlist
Delta list header.
volatile systime_t systime
System Time counter.
sysinterval_t delta
Time interval from previous.
ch_delta_list_t * next
Next in the delta list.
static void chVTSet(virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
Enables a one-shot virtual timer.
sysinterval_t reload
Current reload interval.
static void __vt_object_init(virtual_timers_list_t *vtlp)
Virtual Timers instance initialization.
static void chVTSetContinuousI(virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
Enables a continuous virtual timer.
volatile uint64_t laststamp
Last generated time stamp.
static void chVTResetI(virtual_timer_t *vtp)
Disables a Virtual Timer.
Structure representing a Virtual Timer.
uint64_t sysinterval_t
Type of time interval.
void chVTDoResetI(virtual_timer_t *vtp)
Disables a Virtual Timer.
static sysinterval_t chVTGetReloadIntervalX(virtual_timer_t *vtp)
Returns the current reload value.
systime_t lasttime
System time of the last tick event.
Type of virtual timers list header.
static bool chVTIsSystemTimeWithinX(systime_t start, systime_t end)
Checks if the current system time is within the specified time window.
void chVTDoSetI(virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
Enables a one-shot virtual timer.
static sysinterval_t chVTTimeElapsedSinceX(systime_t start)
Returns the elapsed time since the specified start time.
static void chVTSetContinuous(virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
Enables a continuous virtual timer.
static systime_t chVTGetSystemTime(void)
Current system time.
void chVTDoSetContinuousI(virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
Enables a continuous virtual timer.
static void chVTReset(virtual_timer_t *vtp)
Disables a Virtual Timer.
bool chTimeIsInRangeX(systime_t time, systime_t start, systime_t end)
Checks if the specified time is within the specified time range.
Delta list element and header structure.
#define chSysUnlock()
Leaves the kernel lock state.
static bool chVTIsArmed(const virtual_timer_t *vtp)
Returns true if the specified timer is armed.
static void ch_dlist_init(ch_delta_list_t *dlhp)
Delta list initialization.
#define chSysLock()
Enters the kernel lock state.