22 #define MAX_NUM_TIMERS 10
24 #define MAX_TICKS_IN_SINGLE_CLOCK ((PORT_TIMER_WIDTH)0xFFFFFFFF)
26 #define TOO_MANY_TIMERS_ERROR 255
28 #define opentimer_id_t uint8_t
timer_type_t type
Definition: opentimers.h:50
void opentimers_stop(opentimer_id_t id)
Stop a running timer.
Definition: opentimers.c:174
uint16_t wraps_remaining
Definition: opentimers.h:48
Definition: opentimers.h:58
Definition: opentimers.h:42
void opentimers_sleepTimeCompesation(uint16_t sleepTime)
Definition: opentimers.c:284
timer_type_t
Definition: opentimers.h:34
Definition: opentimers.h:45
void opentimers_setPeriod(opentimer_id_t id, time_type_t timetype, uint32_t newDuration)
Replace the period of a running timer.
Definition: opentimers.c:141
bool isrunning
Definition: opentimers.h:51
bool hasExpired
Definition: opentimers.h:53
uint32_t period_ticks
Definition: opentimers.h:46
Definition: opentimers.h:36
bool running
Definition: opentimers.h:60
void(* opentimers_cbt)(void)
Definition: opentimers.h:30
PORT_TIMER_WIDTH ticks_remaining
Definition: opentimers.h:47
#define opentimer_id_t
Definition: opentimers.h:28
Definition: opentimers.h:35
PORT_TIMER_WIDTH currentTimeout
Definition: opentimers.h:61
void opentimers_restart(opentimer_id_t id)
Restart a stop timer.
Definition: opentimers.c:183
opentimers_cbt callback
Definition: opentimers.h:52
void opentimers_init()
Initialize this module.
Definition: opentimers.c:33
time_type_t
Definition: opentimers.h:40
opentimer_id_t opentimers_start(uint32_t duration, timer_type_t type, time_type_t timetype, opentimers_cbt callback)
Start a timer.
Definition: opentimers.c:73
#define MAX_NUM_TIMERS
Maximum number of timers that can run concurrently.
Definition: opentimers.h:22
Definition: opentimers.h:41