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:
30:d7e36d83ec9d
Parent:
25:3778e6204cc1
Child:
31:e50929bd3f32
--- a/sx1276/sx1276.cpp	Thu Apr 27 18:20:59 2017 +0200
+++ b/sx1276/sx1276.cpp	Thu Apr 27 22:33:38 2017 +0200
@@ -882,7 +882,7 @@
     this->settings.State = RF_RX_RUNNING;
     if( timeout != 0 )
     {
-        rxTimeoutTimer.attach_us( this, &SX1276::OnTimeoutIrq, timeout );
+        rxTimeoutTimer.attach_us(callback(this, &SX1276::OnTimeoutIrq), timeout );
     }
 
     if( this->settings.Modem == MODEM_FSK )
@@ -891,7 +891,7 @@
 
         if( rxContinuous == false )
         {
-            rxTimeoutSyncWord.attach_us( this, &SX1276::OnTimeoutIrq, ceil( ( 8.0 * ( this->settings.Fsk.PreambleLen +
+            rxTimeoutSyncWord.attach_us(callback(this, &SX1276::OnTimeoutIrq), ceil( ( 8.0 * ( this->settings.Fsk.PreambleLen +
                                                              ( ( Read( REG_SYNCCONFIG ) &
                                                                 ~RF_SYNCCONFIG_SYNCSIZE_MASK ) +
                                                                 1.0 ) + 10.0 ) /
@@ -969,7 +969,7 @@
     }
 
     this->settings.State = RF_TX_RUNNING;
-    txTimeoutTimer.attach_us( this, &SX1276::OnTimeoutIrq, timeout );
+    txTimeoutTimer.attach_us(callback(this, &SX1276::OnTimeoutIrq), timeout );
     SetOpMode( RF_OPMODE_TRANSMITTER );
 }
 
@@ -1121,7 +1121,7 @@
             {
                 // Continuous mode restart Rx chain
                 Write( REG_RXCONFIG, Read( REG_RXCONFIG ) | RF_RXCONFIG_RESTARTRXWITHOUTPLLLOCK );
-                rxTimeoutSyncWord.attach_us( this, &SX1276::OnTimeoutIrq, ceil( ( 8.0 * ( this->settings.Fsk.PreambleLen +
+                rxTimeoutSyncWord.attach_us(callback(this, &SX1276::OnTimeoutIrq), ceil( ( 8.0 * ( this->settings.Fsk.PreambleLen +
                                                              ( ( Read( REG_SYNCCONFIG ) &
                                                                 ~RF_SYNCCONFIG_SYNCSIZE_MASK ) +
                                                              1.0 ) + 10.0 ) /
@@ -1184,7 +1184,7 @@
                         {
                             // Continuous mode restart Rx chain
                             Write( REG_RXCONFIG, Read( REG_RXCONFIG ) | RF_RXCONFIG_RESTARTRXWITHOUTPLLLOCK );
-                            rxTimeoutSyncWord.attach_us( this, &SX1276::OnTimeoutIrq, ceil( ( 8.0 * ( this->settings.Fsk.PreambleLen +
+                            rxTimeoutSyncWord.attach_us(callback(this, &SX1276::OnTimeoutIrq), ceil( ( 8.0 * ( this->settings.Fsk.PreambleLen +
                                                                          ( ( Read( REG_SYNCCONFIG ) &
                                                                             ~RF_SYNCCONFIG_SYNCSIZE_MASK ) +
                                                                          1.0 ) + 10.0 ) /
@@ -1235,7 +1235,7 @@
                 {
                     // Continuous mode restart Rx chain
                     Write( REG_RXCONFIG, Read( REG_RXCONFIG ) | RF_RXCONFIG_RESTARTRXWITHOUTPLLLOCK );
-                    rxTimeoutSyncWord.attach_us( this, &SX1276::OnTimeoutIrq, ceil( ( 8.0 * ( this->settings.Fsk.PreambleLen +
+                    rxTimeoutSyncWord.attach_us(callback(this, &SX1276::OnTimeoutIrq), ceil( ( 8.0 * ( this->settings.Fsk.PreambleLen +
                                                                  ( ( Read( REG_SYNCCONFIG ) &
                                                                     ~RF_SYNCCONFIG_SYNCSIZE_MASK ) +
                                                                  1.0 ) + 10.0 ) /