SX1276GenericLib to support sx1276 bassed LoRa modules, including HopeRF RFM95, Murata CMWX1ZZABZ and Semtech SX1276MB1MAS/SX1276MB1LAS modules

Dependents:   DISCO-L072CZ-LRWAN1_LoRa_PingPong DISCO-L072CZ-LRWAN1_LoRa_PingPong DISCO-L072CZ-LRWAN1_LoRa_PingPong DISCO-L072CZ-LRWAN1_LoRa_USB_Rx ... more

Fork of SX1276Lib by Semtech

Revision:
89:b0203b4a36ec
Parent:
83:019da451b283
Child:
94:e6c0279f550a
--- a/sx1276/sx1276.cpp	Wed Aug 30 09:48:34 2017 +0200
+++ b/sx1276/sx1276.cpp	Wed Aug 30 12:02:09 2017 +0200
@@ -1121,8 +1121,8 @@
         return 0;
     
     val = (Read(REG_LR_FEIMSB) & 0b1111) << 16; // high word, 4 valid bits only
-    val |= (Read(REG_LR_FEIMID) << 8) | Read(REG_LR_FEILSB); // high byte, low byte
-    if (val & 0x8000) //sconvert ign bit
+    val |= ((Read(REG_LR_FEIMID) << 8) | Read(REG_LR_FEILSB)); // high byte, low byte
+    if (val & 0x80000) //convert sign bit
         val |= 0xfff00000;
     
     int32_t bandwidth = 0;