diff options
Diffstat (limited to 'libloragw/src/loragw_fpga.c')
-rw-r--r-- | libloragw/src/loragw_fpga.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libloragw/src/loragw_fpga.c b/libloragw/src/loragw_fpga.c index 90fb9b7..832152b 100644 --- a/libloragw/src/loragw_fpga.c +++ b/libloragw/src/loragw_fpga.c @@ -134,6 +134,7 @@ int lgw_fpga_configure(uint32_t tx_notch_freq) { int x; int32_t val; bool spectral_scan_support, lbt_support; + uint8_t fpga_version; /* Check input parameters */ if ((tx_notch_freq < LGW_MIN_NOTCH_FREQ) || (tx_notch_freq > LGW_MAX_NOTCH_FREQ)) { @@ -166,8 +167,8 @@ int lgw_fpga_configure(uint32_t tx_notch_freq) { return LGW_REG_ERROR; } - - if (read_fpga_version() > 28) { + fpga_version = read_fpga_version(); + if (fpga_version > 28) { /* Required for Semtech AP2 reference design and AP1.5 > v28 */ x = lgw_fpga_reg_w(LGW_FPGA_CTRL_INVERT_IQ, 1); if (x != LGW_REG_SUCCESS) { |