63 #define EEPROMMACADDRESS ((void*)0)
64 #define EEPROMDSTADDRESS ((void*)8)
65 #define EEPROMCHANADDRESS ((void*)16)
66 #define EEPROMPANIDADDRESS ((void*)17)
67 #define EEPROMROLEADDRESS ((void*)19)
69 #define CHANNEL_PAGE_0 (0)
81 #define FCF_NO_ACK (0x8841)
82 #define FCF_ACK_REQ (0x8861)
89 #define DEST_PAN_ID (0xABCD)
90 #define SOURCE_PAN_ID (0xABCD)
91 #define LONG_ADDR_1 (0xFFEEDDCCBBAA1100LL)
92 #define LONG_ADDR_2 (0x1122334455667788LL)
93 #define LONG_ADDR_3 (0xDDEEAADDBBEEEEFFLL)
94 #define LONG_ADDR_4 (0x0123456789ABCDEFLL)
95 #define SOURCE_ADDR (0x1234)
96 #define FCF_ACK (0x0002)
97 #define TX_OPTION_NOACK (0)
98 #define TX_OPTION_ACK (1)
99 #define LONG_ADDR_LEN (8)
102 #define MPDU_OVERHEAD (11)
109 #define BEACONFRAME (0x00)
110 #define DATAFRAME (0x01)
111 #define ACKFRAME (0x02)
112 #define CMDFRAME (0x03)
114 #define BEACONREQ (0x07)
116 #define IEEERESERVED (0x00)
117 #define NOADDR (0x00)
118 #define SHORTADDRMODE (0x02)
119 #define LONGADDRMODE (0x03)
121 #define NOBEACONS (0x0F)
123 #define BROADCASTADDR (0xFFFF)
124 #define BROADCASTPANDID (0xFFFF)
126 #define IEEE802154_2003 (0x00)
127 #define IEEE802154_2006 (0x01)
129 #define SECURITY_LEVEL_NONE (0)
130 #define SECURITY_LEVEL_128 (3)
132 #define PSDULEN (127)
138 typedef struct dataRequest {
147 uint8_t securityLevel;
156 extern dataRequest_t dataRequestStructAddress;
157 #define ieee15_4Struct (&ieee15_4ManagerAddress)
158 #define dataRequestStruct (&dataRequestStructAddress)
166 extern uint8_t msduHandle;
167 extern bool iAmCoord;
168 extern bool autoModes;
169 extern uint16_t macShortAddr;
uint16_t macCoordShortAddress
The 16-bit short address assigned to the coordinator through which the network layer wishes to commun...
Example glue code between the existing MAC code and the Contiki mac interface.
uint16_t macSrcPANId
The 16-bit identifier of the PAN on which the device is operating.
The interface structure for the 802.15.4 quasi-MAC.
uint64_t macLongAddr
Our own long address.
uint8_t macDSN
The sequence number (0x00 - 0xff) added to the transmitted data or MAC command frame.
uint64_t macCoordExtendedAddress
The 64-bit address of the coordinator/router through which the network layer wishes to communicate...
ieee_15_4_manager_t ieee15_4ManagerAddress
Interface structure for this module.
void mac_init(void)
Initializes the (quasi) 802.15.4 MAC.
Union of both short and long addresses.
uint8_t phyCurrentChannel
The RF channel to use for all following transmissions and receptions (see 6.1.2). ...
uint64_t macDestAddress
This address is the 64-bit address that will be used as the mechanism to provide a destination to the...
802.15.4 frame creation and parsing functions
uint16_t macShortAddress
The 16-bit address that the device uses to communicate in the PAN.
uint16_t macDstPANId
The 16-bit identifier of the PAN on which the device is sending to.