1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

ieee802154: change frame type definition to enum

This commit is contained in:
Oleg Hahm 2014-11-05 11:40:31 +01:00
parent 8ab6e691d0
commit 74a53e824e

View File

@ -30,10 +30,12 @@
/* ...and FCS*/ /* ...and FCS*/
#define IEEE_802154_FCS_LEN (2) #define IEEE_802154_FCS_LEN (2)
#define IEEE_802154_BEACON_FRAME (0) typedef enum __attribute__((packed)) {
#define IEEE_802154_DATA_FRAME (1) IEEE_802154_BEACON_FRAME = 0,
#define IEEE_802154_ACK_FRAME (2) IEEE_802154_DATA_FRAME = 1,
#define IEEE_802154_MAC_CMD_FRAME (3) IEEE_802154_ACK_FRAME = 2,
IEEE_802154_MAC_CMD_FRAME = 3
} ieee802154_frame_type_t;
#define IEEE_802154_SHORT_ADDR_M (2) #define IEEE_802154_SHORT_ADDR_M (2)
#define IEEE_802154_LONG_ADDR_M (3) #define IEEE_802154_LONG_ADDR_M (3)
@ -66,7 +68,7 @@
#define LETOHS(a) HTOLES(a) #define LETOHS(a) HTOLES(a)
typedef struct __attribute__((packed)) { typedef struct __attribute__((packed)) {
uint8_t frame_type; ieee802154_frame_type_t frame_type;
uint8_t sec_enb; uint8_t sec_enb;
uint8_t frame_pend; uint8_t frame_pend;
uint8_t ack_req; uint8_t ack_req;