diff options
author | Sylvain Miermont <smiermont@semtech.com> | 2013-07-04 17:03:46 +0200 |
---|---|---|
committer | Sylvain Miermont <smiermont@semtech.com> | 2013-10-23 10:40:07 +0200 |
commit | fea7eef3bd031874a7c38064597e64d7b1f821c3 (patch) | |
tree | 38219a9a2ad63e6338168f430b46ce2827071993 /loragw_hal/inc/loragw_hal.h | |
parent | 1361e7215cd0eb3b38faff1c403cb3077e41b2be (diff) | |
download | lora_gateway-fea7eef3bd031874a7c38064597e64d7b1f821c3.tar.gz lora_gateway-fea7eef3bd031874a7c38064597e64d7b1f821c3.tar.bz2 lora_gateway-fea7eef3bd031874a7c38064597e64d7b1f821c3.zip |
Beta 1v1.b1
- 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
Diffstat (limited to 'loragw_hal/inc/loragw_hal.h')
-rw-r--r-- | loragw_hal/inc/loragw_hal.h | 10 |
1 files changed, 9 insertions, 1 deletions
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 @@ -21,6 +21,15 @@ Description: #include <stdbool.h> /* 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 ----------------------------------------------------- */ /* return status code */ @@ -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 */ |