56 return ticks() + msec;
95 static inline bool timeOutWaitFor(uint32_t * flags, uint32_t mask, uint32_t result, uint32_t msec) {
100 if ((*flags & mask) == result)
return true;
White Rabbit simple timer 'Ticks' driver.
void timeDelay(uint32_t msec)
Simple busy-wait delay.
static uint32_t ticks()
Nr of ticks since device start up.
static uint32_t timeOutInit(uint32_t msec)
Initializes a timeout with the specified no of msecs.
static bool timeOutWaitFor(uint32_t *flags, uint32_t mask, uint32_t result, uint32_t msec)
Function to wait for a specific flag to be set or cleared.
static bool timeOut(uint32_t to)
Checks whether or not the timeout has expired.
Manages the global system error.
This module is responsible for distributing error codes.
#define E_TIMEOUT
Generic error: Timeout error.
#define CGT(A, B, BITS)
Cyclic comparison function Greater Than.
bool errSet(uint32_t code, const char *error, const char *name)
Sets an error.
#define ERROR(CODE,...)
Expands an error code to an error code with a description (if ERROR_W_DESCR is declared).
static uint32_t timeOutUpdate(uint32_t to, uint32_t msec)
Updates the original timeout with the new timeout.