mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:43:28 +08:00
wireless/ieee802154: Adds ieee802154_addr_mode_e enumeration
This commit is contained in:
@@ -69,14 +69,20 @@ struct ieee802154_packet_s
|
|||||||
* Extended address + PAN id : PPPP/LLLLLLLLLLLLLLLL
|
* Extended address + PAN id : PPPP/LLLLLLLLLLLLLLLL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
enum ieee802154_addr_mode_e {
|
||||||
|
IEEE802154_ADDRMODE_NONE = 0,
|
||||||
|
IEEE802154_ADDRMODE_SHORT = 2,
|
||||||
|
IEEE802154_ADDRMODE_EXTENDED
|
||||||
|
};
|
||||||
|
|
||||||
struct ieee802154_addr_s
|
struct ieee802154_addr_s
|
||||||
{
|
{
|
||||||
uint8_t ia_len; /* structure length, 0/2/8 */
|
enum ieee802154_addr_mode_e ia_mode; /* Address mode. Short or Extended */
|
||||||
uint16_t ia_panid; /* PAN identifier, can be IEEE802154_PAN_UNSPEC */
|
uint16_t ia_panid; /* PAN identifier, can be IEEE802154_PAN_UNSPEC */
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
uint16_t _ia_saddr; /* short address */
|
uint16_t _ia_saddr; /* short address */
|
||||||
uint8_t _ia_eaddr[8]; /* extended address */
|
uint8_t _ia_eaddr[8]; /* extended address */
|
||||||
} ia_addr;
|
} ia_addr;
|
||||||
|
|
||||||
#define ia_saddr ia_addr._ia_saddr
|
#define ia_saddr ia_addr._ia_saddr
|
||||||
@@ -85,7 +91,6 @@ struct ieee802154_addr_s
|
|||||||
|
|
||||||
#define IEEE802154_ADDRSTRLEN 22 /* (2*2+1+8*2, PPPP/EEEEEEEEEEEEEEEE) */
|
#define IEEE802154_ADDRSTRLEN 22 /* (2*2+1+8*2, PPPP/EEEEEEEEEEEEEEEE) */
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#define EXTERN extern "C"
|
#define EXTERN extern "C"
|
||||||
extern "C"
|
extern "C"
|
||||||
|
|||||||
Reference in New Issue
Block a user