diff options
author | Harsh Sharma <harsh.sharma@multitech.com> | 2018-07-31 15:08:46 -0500 |
---|---|---|
committer | Harsh Sharma <harsh.sharma@multitech.com> | 2018-07-31 15:08:46 -0500 |
commit | b55d02b1b9620b2bd736df88d9f987d61b52168d (patch) | |
tree | 28eac67fbf8bb819fbcc40c49b438d9df1429b8b /libloragw/inc | |
parent | e81839dd723cdf8218987e8f7917c12e39c179d8 (diff) | |
download | lora_gateway_mtac_full-b55d02b1b9620b2bd736df88d9f987d61b52168d.tar.gz lora_gateway_mtac_full-b55d02b1b9620b2bd736df88d9f987d61b52168d.tar.bz2 lora_gateway_mtac_full-b55d02b1b9620b2bd736df88d9f987d61b52168d.zip |
Added function to setup fpga attenuation and tx lut variable
Diffstat (limited to 'libloragw/inc')
-rw-r--r-- | libloragw/inc/loragw_fpga.h | 2 | ||||
-rw-r--r-- | libloragw/inc/loragw_hal.h | 1 | ||||
-rw-r--r-- | libloragw/inc/loragw_reg.h | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/libloragw/inc/loragw_fpga.h b/libloragw/inc/loragw_fpga.h index 852f378..07418e4 100644 --- a/libloragw/inc/loragw_fpga.h +++ b/libloragw/inc/loragw_fpga.h @@ -99,7 +99,7 @@ float lgw_fpga_get_tx_notch_delay(void); @param tx_notch_freq TX notch filter frequency, in Hertz @return status of register operation (LGW_REG_SUCCESS/LGW_REG_ERROR) */ -int lgw_fpga_configure(uint32_t tx_notch_freq); +int lgw_fpga_configure(uint32_t tx_notch_freq, bool fpga_attn_used); /** @brief LoRa concentrator FPGA register write diff --git a/libloragw/inc/loragw_hal.h b/libloragw/inc/loragw_hal.h index d5f9ade..632b72b 100644 --- a/libloragw/inc/loragw_hal.h +++ b/libloragw/inc/loragw_hal.h @@ -282,6 +282,7 @@ struct lgw_tx_gain_s { uint8_t pa_gain; /*!> 2 bits, control of the external PA (SX1301 I/O) */ uint8_t dac_gain; /*!> 2 bits, control of the radio DAC */ uint8_t mix_gain; /*!> 4 bits, control of the radio mixer */ + float attenuation; /*!> 7 bits, control of the attenuator , in dBm */ int8_t rf_power; /*!> measured TX power at the board connector, in dBm */ }; diff --git a/libloragw/inc/loragw_reg.h b/libloragw/inc/loragw_reg.h index 1e98efa..085dfb6 100644 --- a/libloragw/inc/loragw_reg.h +++ b/libloragw/inc/loragw_reg.h @@ -413,7 +413,7 @@ concentrator, or if we also want to reset it and configure the FPGA (if present) used with SX1301AP2 reference design). @return status of register operation (LGW_REG_SUCCESS/LGW_REG_ERROR) */ -int lgw_connect(bool spi_only, uint32_t tx_notch_freq); +int lgw_connect(bool spi_only, uint32_t tx_notch_freq, bool fpga_attn_used); /** @brief Disconnect LoRa concentrator by closing SPI link |