ieee802154: introduce constant for default PAN id

This commit is contained in:
Oleg Hahm 2014-11-16 19:04:01 +01:00
parent d56ebcbff2
commit fbd04bd051
2 changed files with 7 additions and 1 deletions

View File

@ -47,6 +47,12 @@ typedef enum __attribute__((packed)) {
#define IEEE_802154_SHORT_MCAST_ADDR (0xffff)
#define IEEE_802154_LONG_MCAST_ADDR {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
0xff, 0xff}}
/**
* @brief The default PAN id to use if not specified otherwise by upper layers
*/
#define IEEE_802154_DEFAULT_PAN_ID (1)
/**
* @brief Transform 16-bit number from network order (big-endian) to
* little-endian byte order (as used by IEEE 802.15.4).

View File

@ -252,7 +252,7 @@ void _transceiver_send_handler(int argc, char **argv)
p.frame.dest_pan_id = atoi(argv[3]);
}
else {
p.frame.dest_pan_id = 1;
p.frame.dest_pan_id = IEEE_802154_DEFAULT_PAN_ID;
}
#else
p.data = (uint8_t *) text_msg;