From cc09e44cfb535bf623bc88f6627ab792754a359a Mon Sep 17 00:00:00 2001 From: Hasnain Virk Date: Tue, 8 May 2018 16:19:55 +0300 Subject: [PATCH] Moving msg flags to lorawan_types.h Message flags are used in the application so the logical place for them is in lorawan_types.h and not in lorawan_data_structures.h --- features/lorawan/lorawan_types.h | 34 +++++++++++++++++++ .../lorawan/system/lorawan_data_structures.h | 34 ------------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/features/lorawan/lorawan_types.h b/features/lorawan/lorawan_types.h index 834f88d441..d4c12c1d47 100644 --- a/features/lorawan/lorawan_types.h +++ b/features/lorawan/lorawan_types.h @@ -34,6 +34,40 @@ #include "platform/Callback.h" +/** + * Option Flags for send(), receive() APIs + */ +#define MSG_UNCONFIRMED_FLAG 0x01 +#define MSG_CONFIRMED_FLAG 0x02 +#define MSG_MULTICAST_FLAG 0x04 +#define MSG_PROPRIETARY_FLAG 0x08 + +/** + * Bit mask for message flags + */ + +#define MSG_FLAG_MASK 0x0F + +/** + * Mask for unconfirmed multicast message + */ +#define MSG_UNCONFIRMED_MULTICAST 0x05 + +/** + * Mask for confirmed multicast message + */ +#define MSG_CONFIRMED_MULTICAST 0x06 + +/** + * Mask for unconfirmed message proprietary message + */ +#define MSG_UNCONFIRMED_PROPRIETARY 0x09 + +/** + * Mask for confirmed proprietary message + */ +#define MSG_CONFIRMED_PROPRIETARY 0x0A + /** * LoRaWAN device classes definition. * diff --git a/features/lorawan/system/lorawan_data_structures.h b/features/lorawan/system/lorawan_data_structures.h index 166772bfcb..ae2c578d00 100644 --- a/features/lorawan/system/lorawan_data_structures.h +++ b/features/lorawan/system/lorawan_data_structures.h @@ -47,40 +47,6 @@ typedef uint32_t lorawan_time_t; // Radio wake-up time from sleep - unit ms. #define RADIO_WAKEUP_TIME 1 -/** - * Option Flags for send(), receive() APIs - */ -#define MSG_UNCONFIRMED_FLAG 0x01 -#define MSG_CONFIRMED_FLAG 0x02 -#define MSG_MULTICAST_FLAG 0x04 -#define MSG_PROPRIETARY_FLAG 0x08 - -/** - * Bit mask for message flags - */ - -#define MSG_FLAG_MASK 0x0F - -/** - * Mask for unconfirmed multicast message - */ -#define MSG_UNCONFIRMED_MULTICAST 0x05 - -/** - * Mask for confirmed multicast message - */ -#define MSG_CONFIRMED_MULTICAST 0x06 - -/** - * Mask for unconfirmed message proprietary message - */ -#define MSG_UNCONFIRMED_PROPRIETARY 0x09 - -/** - * Mask for confirmed proprietary message - */ -#define MSG_CONFIRMED_PROPRIETARY 0x0A - /*! * Sets the length of the LoRaMAC footer field. * Mainly indicates the MIC field length.