Out-of-office display, GFX
 All Classes Files Functions Variables Enumerations Enumerator Groups
Classes | Macros | Enumerations | Functions
tickTimer.h File Reference
#include <stdbool.h>

Go to the source code of this file.

Classes

struct  tick
 A tick is split in seconds and milliseconds. More...

Macros

#define TICKTIMER_MAX_CALLBACKS   15
 Size of the callback function array.
#define TICKTIMER_TIMER_NO   1
 The number of the hardware time to use.

Enumerations

enum  tickTimer_initRetVal { TickTimerInit_OK, TickTimerInit_errPriority, TickTimerInit_errInterval }
 tickTimer_init() return values More...

Functions

int tickTimer_init (unsigned int intervalMs, int priority)
 Initialise the tick timer module.
struct tick tickTimer_getTick ()
 Returs the current tick.
unsigned long tickTimer_diff (const struct tick *lastTick)
 Calculation the duration between the current tick value and the given lastTick
bool tickTimer_hasPassed (const struct tick *lastTick, unsigned long durationMs)
 Compare a previously retrieved tick with the current tick and check if the difference is longer than the expected duration.
int tickTimer_addCallback (void(*callback)(void *arg), void *arg, int intervalSecs, int intervalMSecs, int repeats)
 Add a callback function.
void tickTimer_removeCallback (void(*callback)(void *arg))
 Remove a previously registered callback.
bool tickTimer_callbackActive (void(*callback)(void *arg))
 Check if callback is active.
void tickTimer_handleCallbacks ()
 Check all registered callbacks and see if they chould be called given the current tick value.

Detailed Description