OpenWSN Firmware
opentimers.h File Reference
#include "openwsn.h"

Go to the source code of this file.

Data Structures

struct  opentimers_t
 
struct  opentimers_vars_t
 

Macros

#define MAX_NUM_TIMERS   10
 Maximum number of timers that can run concurrently. More...
 
#define MAX_TICKS_IN_SINGLE_CLOCK   ((PORT_TIMER_WIDTH)0xFFFFFFFF)
 
#define TOO_MANY_TIMERS_ERROR   255
 
#define opentimer_id_t   uint8_t
 

Typedefs

typedef void(* opentimers_cbt )(void)
 

Enumerations

enum  timer_type_t { TIMER_PERIODIC, TIMER_ONESHOT }
 
enum  time_type_t { TIME_MS, TIME_TICS }
 

Functions

void opentimers_init (void)
 Initialize this module. More...
 
opentimer_id_t opentimers_start (uint32_t duration, timer_type_t type, time_type_t timetype, opentimers_cbt callback)
 Start a timer. More...
 
void opentimers_setPeriod (opentimer_id_t id, time_type_t timetype, uint32_t newPeriod)
 Replace the period of a running timer. More...
 
void opentimers_stop (opentimer_id_t id)
 Stop a running timer. More...
 
void opentimers_restart (opentimer_id_t id)
 Restart a stop timer. More...
 
void opentimers_sleepTimeCompesation (uint16_t sleepTime)