From c05674a9613e5acd5e0bdee9d1298a780189a459 Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Tue, 29 Oct 2019 14:40:59 -0500 Subject: Added support for attenuator for LGA modules and full cards --- libloragw/inc/loragw_hal.h | 1 + libloragw/inc/loragw_reg.h | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'libloragw/inc') diff --git a/libloragw/inc/loragw_hal.h b/libloragw/inc/loragw_hal.h index 15bf918..fda8908 100644 --- a/libloragw/inc/loragw_hal.h +++ b/libloragw/inc/loragw_hal.h @@ -177,6 +177,7 @@ enum lgw_radio_type_e { struct lgw_conf_board_s { bool lorawan_public; /*!> Enable ONLY for *public* networks using the LoRa MAC protocol */ uint8_t clksrc; /*!> Index of RF chain which provides clock to concentrator */ + uint8_t max_tx_power; /*!> Max power limit for transmitting packets */ }; /** diff --git a/libloragw/inc/loragw_reg.h b/libloragw/inc/loragw_reg.h index 1e98efa..4dd9edb 100644 --- a/libloragw/inc/loragw_reg.h +++ b/libloragw/inc/loragw_reg.h @@ -403,14 +403,17 @@ uint8_t read_fpga_version(); @param version number provided to check through the validated list @return status true/false */ -bool check_fpga_version(uint8_t version); +bool fpga_version_supported(); + +/** +@brief Check if the LoRa FPGA uses an attenuator for transmitting packets +@return status true/false +*/ +bool fpga_supports_attenuator(); /** @brief Connect LoRa concentrator by opening SPI link -@param spi_only indicates if we only want to create the SPI connexion to the concentrator, or if we also want to reset it and configure the FPGA (if present) -@param tx_notch_filter TX notch filter frequency to be set in the FPGA (only -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); -- cgit v1.2.3