From fea7eef3bd031874a7c38064597e64d7b1f821c3 Mon Sep 17 00:00:00 2001 From: Sylvain Miermont Date: Thu, 4 Jul 2013 17:03:46 +0200 Subject: Beta 1 - added code for ppm_offset management (activated when symbol length > 16 ms) - removed temporarily TX polarity management - added macro for variable checking (range and/or valid symbolic value) - renamed variables & macros --- loragw_hal/inc/loragw_hal.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'loragw_hal/inc/loragw_hal.h') diff --git a/loragw_hal/inc/loragw_hal.h b/loragw_hal/inc/loragw_hal.h index 1057251..936d0af 100644 --- a/loragw_hal/inc/loragw_hal.h +++ b/loragw_hal/inc/loragw_hal.h @@ -20,6 +20,15 @@ Description: #include /* C99 types */ #include /* bool type */ +/* -------------------------------------------------------------------------- */ +/* --- PUBLIC MACROS -------------------------------------------------------- */ + +#define IS_LORA_BW(bw) ((bw == BW_125KHZ) || (bw == BW_250KHZ) || (bw == BW_500KHZ)) +#define IS_LORA_STD_DR(dr) ((dr == DR_LORA_SF7) || (dr == DR_LORA_SF8) || (dr == DR_LORA_SF9) || (dr == DR_LORA_SF10) || (dr == DR_LORA_SF11) || (dr == DR_LORA_SF12)) +#define IS_LORA_MULTI_DR(dr) ((dr & ~DR_LORA_MULTI) == 0) /* ones outside of DR_LORA_MULTI bitmask -> not a combination of Lora datarates */ +#define IS_LORA_CR(cr) ((cr == CR_LORA_4_5) || (cr == CR_LORA_4_6) || (cr == CR_LORA_4_7) || (cr == CR_LORA_4_8)) +#define IS_TX_MODE(mode) ((mode == IMMEDIATE) || (mode == TIMESTAMPED) || (mode == ON_GPS)) + /* -------------------------------------------------------------------------- */ /* --- PUBLIC CONSTANTS ----------------------------------------------------- */ @@ -173,7 +182,6 @@ struct lgw_pkt_tx_s { int8_t rf_power; /*!> TX power, in dBm */ uint8_t modulation; /*!> modulation to use for the packet */ uint8_t bandwidth; /*!> modulation bandwidth (Lora only) */ - bool invert_pol; /*!> invert signal polarity, for orthogonal downlinks (Lora only) */ uint16_t f_dev; /*!> frequency deviation (FSK only) */ uint16_t datarate; /*!> TX datarate */ uint8_t coderate; /*!> error-correcting code of the packet */ -- cgit v1.2.3