OpenWSN Firmware
stupidmac.h
Go to the documentation of this file.
1 
7 #ifndef __STUPIDMAC_H
8 #define __STUPIDMAC_H
9 
10 #include "openwsn.h"
11 
12 enum {
13  //default
15  //transmitter
20  //receiver
24 };
25 
26 enum {
27  IMMEDIATELY = 1, //used as timer value which is very small
28  WATCHDOG_PREPARESEND = 16000, //500ms
29 };
30 
31 enum {
34 };
35 
36 //timer wait times (in 1/32768 seconds), slow version
37 /*enum {
38  PERIODICTIMERPERIOD = 9828, // 300ms
39  MINBACKOFF = 6552, // 200ms
40  ACK_WAIT_TIME = 3276, // 100ms
41 };*/
42 
43 //timer wait times (in 1/32768 seconds), fast version
44 enum {
45  PERIODICTIMERPERIOD = 982, // 30ms
46  MINBACKOFF = 655, // 20ms
47  ACK_WAIT_TIME = 327, // 10ms
48 };
49 
50 void stupidmac_init();
51 error_t stupidmac_send(OpenQueueEntry_t* msg);
52 void stupidmac_sendDone(OpenQueueEntry_t* msg, error_t error);
59 
60 #endif
Definition: stupidmac.h:22
Definition: stupidmac.h:27
void timer_mac_watchdog_fired()
Definition: stupidmac.c:329
Definition: stupidmac.h:47
void timer_mac_periodic_fired()
Definition: stupidmac.c:281
Definition: stupidmac.h:14
Definition: stupidmac.h:45
void stupidmac_init()
Definition: stupidmac.c:41
Definition: stupidmac.h:17
Definition: stupidmac.h:33
Definition: stupidmac.h:18
void stupidmac_sendDone(OpenQueueEntry_t *pkt, error_t error)
Definition: stupidmac.c:76
Definition: stupidmac.h:32
Definition: stupidmac.h:46
Definition: stupidmac.h:21
error_t stupidmac_send(OpenQueueEntry_t *msg)
Definition: stupidmac.c:50
Definition: stupidmac.h:28
Definition: stupidmac.h:19
#define FALSE
Definition: openwsn.h:31
Definition: stupidmac.h:23
void timer_mac_backoff_fired()
Definition: stupidmac.c:300
Definition: stupidmac.h:16
Definition: openwsn.h:288
void stupidmac_packet_received(OpenQueueEntry_t *pkt)
void packetReceived()
Definition: stupidmac.c:241
bool stupidmac_debugPrint()
Definition: stupidmac.c:274
#define TRUE
Definition: openwsn.h:27