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" 52 #if (CH_CFG_ST_TIMEDELTA > 0) && (CH_DBG_THREADS_PROFILING == TRUE) 53 #error "CH_DBG_THREADS_PROFILING not supported in tickless mode" 117 #if CH_CFG_ST_TIMEDELTA == 0 120 return port_timer_get_time();
218 #if CH_CFG_ST_TIMEDELTA == 0 245 return (
bool)(vtp->
func != NULL);
374 #if CH_CFG_ST_TIMEDELTA == 0 409 if (nowdelta < vtp->delta) {
419 nowdelta -= vtp->
delta;
428 port_timer_stop_alarm();
439 while (vtp->
delta <= nowdelta);
457 #if CH_CFG_INTERVALS_SIZE > CH_CFG_ST_RESOLUTION static systime_t chVTGetSystemTimeX(void)
Current system time.
void * par
Timer callback function parameter.
uint64_t systime_t
Type of system time.
uint64_t sysinterval_t
Type of time interval.
static void chSysLock(void)
Enters the kernel lock state.
sysinterval_t delta
Time delta before timeout.
virtual_timer_t * prev
Previous timer in the list.
static void chVTReset(virtual_timer_t *vtp)
Disables a Virtual Timer.
static sysinterval_t chTimeDiffX(systime_t start, systime_t end)
Subtracts two system times returning an interval.
static void chSysUnlock(void)
Leaves the kernel lock state.
static bool chTimeIsInRangeX(systime_t time, systime_t start, systime_t end)
Checks if the specified time is within the specified time range.
#define TIME_MAX_SYSTIME
Maximum system of system time before it wraps.
systime_t lasttime
System time of the last tick event.
static bool chVTIsSystemTimeWithin(systime_t start, systime_t end)
Checks if the current system time is within the specified time window.
virtual_timers_list_t vtlist
Virtual timers delta list header.
static void chVTSetI(virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
Enables a virtual timer.
static void chVTObjectInit(virtual_timer_t *vtp)
Initializes a virtual_timer_t object.
void chDbgCheckClassI(void)
I-class functions context check.
static void chVTSet(virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
Enables a virtual timer.
static bool chVTGetTimersStateI(sysinterval_t *timep)
Returns the time interval until the next timer event.
void chVTDoSetI(virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
Enables a virtual timer.
void(* vtfunc_t)(void *p)
Type of a Virtual Timer callback function.
void chVTDoResetI(virtual_timer_t *vtp)
Disables a Virtual Timer.
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 _vt_init(void)
Virtual Timers initialization.
static systime_t chVTGetSystemTime(void)
Current system time.
volatile systime_t systime
System Time counter.
static bool chVTIsArmedI(const virtual_timer_t *vtp)
Returns true if the specified timer is armed.
ch_system_t ch
System data structures.
static void chSysUnlockFromISR(void)
Leaves the kernel lock state from within an interrupt handler.
#define chDbgAssert(c, r)
Condition assertion.
static void chSysLockFromISR(void)
Enters the kernel lock state from within an interrupt handler.
Virtual Timer descriptor structure.
static bool chVTIsArmed(const virtual_timer_t *vtp)
Returns true if the specified timer is armed.
virtual_timer_t * next
Next timer in the delta list.
static void chVTResetI(virtual_timer_t *vtp)
Disables a Virtual Timer.
#define CH_CFG_ST_TIMEDELTA
Time delta constant for the tick-less mode.
virtual_timer_t * next
Next timer in the list.
static void chVTDoTickI(void)
Virtual timers ticker.
static systime_t chTimeAddX(systime_t systime, sysinterval_t interval)
Adds an interval to a system time returning a system time.
static sysinterval_t chVTTimeElapsedSinceX(systime_t start)
Returns the elapsed time since the specified start time.
vtfunc_t func
Timer callback function pointer.