OpenWSN Firmware
radiotimer.h
Go to the documentation of this file.
1 #ifndef __RADIOTIMER_H
2 #define __RADIOTIMER_H
3 
15 #include "stdint.h"
16 #include "board.h"
17 
18 //=========================== define ==========================================
19 
20 //=========================== typedef =========================================
21 
22 typedef void (*radiotimer_compare_cbt)(void);
23 typedef void (*radiotimer_capture_cbt)(PORT_TIMER_WIDTH timestamp);
24 
25 //=========================== variables =======================================
26 
27 //=========================== prototypes ======================================
28 
29 // admin
30 void radiotimer_init(void);
35 void radiotimer_start(PORT_RADIOTIMER_WIDTH period);
36 // direct access
37 PORT_RADIOTIMER_WIDTH radiotimer_getValue(void);
38 void radiotimer_setPeriod(PORT_RADIOTIMER_WIDTH period);
39 PORT_RADIOTIMER_WIDTH radiotimer_getPeriod(void);
40 // compare
41 void radiotimer_schedule(PORT_RADIOTIMER_WIDTH offset);
42 void radiotimer_cancel(void);
43 // capture
44 PORT_RADIOTIMER_WIDTH radiotimer_getCapturedTime(void);
45 
46 // interrupt handlers
48 
54 #endif
void radiotimer_setEndFrameCb(radiotimer_capture_cbt cb)
void radiotimer_schedule(PORT_RADIOTIMER_WIDTH offset)
void radiotimer_setPeriod(PORT_RADIOTIMER_WIDTH period)
kick_scheduler_t radiotimer_isr(void)
void radiotimer_cancel(void)
void(* radiotimer_compare_cbt)(void)
Definition: radiotimer.h:22
kick_scheduler_t
Definition: board.h:20
void radiotimer_init(void)
void radiotimer_setCompareCb(radiotimer_compare_cbt cb)
PORT_RADIOTIMER_WIDTH radiotimer_getCapturedTime(void)
void radiotimer_start(PORT_RADIOTIMER_WIDTH period)
void radiotimer_setStartFrameCb(radiotimer_capture_cbt cb)
void radiotimer_setOverflowCb(radiotimer_compare_cbt cb)
PORT_RADIOTIMER_WIDTH radiotimer_getPeriod(void)
PORT_RADIOTIMER_WIDTH radiotimer_getValue(void)
void(* radiotimer_capture_cbt)(PORT_TIMER_WIDTH timestamp)
Definition: radiotimer.h:23