SX1272Lib

Fork of SX1272Lib by Semtech

Files at this revision

API Documentation at this revision

Comitter:
sillevl
Date:
Tue Jun 14 08:13:41 2016 +0000
Parent:
6:3dbddff60dc9
Commit message:
add support for lpc1768 and rfm95 WIP ! (part2)

Changed in this revision

sx1272/sx1272-hal.cpp Show annotated file Show diff for this revision Revisions of this file
sx1272/sx1272-hal.h Show annotated file Show diff for this revision Revisions of this file
diff -r 3dbddff60dc9 -r 91ad5308e1a2 sx1272/sx1272-hal.cpp
--- a/sx1272/sx1272-hal.cpp	Fri Jun 10 17:25:26 2016 +0000
+++ b/sx1272/sx1272-hal.cpp	Tue Jun 14 08:13:41 2016 +0000
@@ -18,24 +18,28 @@
 
 SX1272MB2xAS::SX1272MB2xAS( RadioEvents_t *events,
                             PinName mosi, PinName miso, PinName sclk, PinName nss, PinName reset,
-                            PinName dio0, PinName dio1, PinName dio2, PinName dio3, PinName dio4, PinName dio5,
+                            PinName dio0, PinName dio1, PinName dio2, PinName dio3, PinName dio4, PinName dio5
 #if defined ( TARGET_MOTE_L152RC )
-                            PinName rfSwitchCntr1, PinName rfSwitchCntr2 )
+                           , PinName rfSwitchCntr1, PinName rfSwitchCntr2 )
 #elif defined ( TARGET_MTS_MDOT_F411RE )
-                            PinName txctl, PinName rxctl )
+                            ,PinName txctl, PinName rxctl )
+#elif defined ( TARGET_MBED_LPC1768 )
+                            ) // nothing extra needed
 #else
-                            PinName antSwitch )
+                            ,PinName antSwitch )
 #endif
-                            : SX1272( events, mosi, miso, sclk, nss, reset, dio0, dio1, dio2, dio3, dio4, dio5 ),
+                            : SX1272( events, mosi, miso, sclk, nss, reset, dio0, dio1, dio2, dio3, dio4, dio5 )
 #if defined ( TARGET_MOTE_L152RC )
-                            RfSwitchCntr1( rfSwitchCntr1 ),
+                            ,RfSwitchCntr1( rfSwitchCntr1 ),
                             RfSwitchCntr2( rfSwitchCntr2 ),
                             PwrAmpCntr( PD_2 )               
 #elif defined ( TARGET_MTS_MDOT_F411RE )
-                            TxCtl ( txctl ),
+                            ,TxCtl ( txctl ),
                             RxCtl ( rxctl )
+#elif defined ( TARGET_MBED_LPC1768 )
+                            // nothing extra needed
 #else
-                            AntSwitch( antSwitch ),
+                            ,AntSwitch( antSwitch ),
                         #if( defined ( TARGET_NUCLEO_L152RE ) )
                             Fake( D8 )
                         #else
@@ -75,9 +79,7 @@
                             TxCtl( LORA_TXCTL ),
                             RxCtl( LORA_RXCTL )
                         #elif defined ( TARGET_MBED_LPC1768 )
-                        :   SX1272( events, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15 ),
-                            AntSwitch( p16 ), 
-                            Fake( p17 )
+                        :   SX1272( events, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15 )
                         #else
                         :   SX1272( events, D11, D12, D13, D10, A0, D2, D3, D4, D5, D8, D9 ),
                             AntSwitch( A4 ), 
@@ -225,6 +227,8 @@
 #elif defined ( TARGET_MTS_MDOT_F411RE )
     this->TxCtl = 0;
     this->RxCtl = 0;
+#elif defined ( TARGET_MBED_LPC1768 )
+    // do nothing
 #else
     this->AntSwitch = 0;
 #endif
@@ -239,6 +243,8 @@
 #elif defined ( TARGET_MTS_MDOT_F411RE )
     this->TxCtl = 0;
     this->RxCtl = 0;    
+#elif defined ( TARGET_MBED_LPC1768 )
+    // do nothing
 #else
     this->AntSwitch = 0;
 #endif
@@ -288,6 +294,8 @@
         this->TxCtl = 0;
         this->RxCtl = 1;   
     }    
+#elif defined ( TARGET_MBED_LPC1768 )
+    // do nothing
 #else
     this->rxTx = rxTx;
 
diff -r 3dbddff60dc9 -r 91ad5308e1a2 sx1272/sx1272-hal.h
--- a/sx1272/sx1272-hal.h	Fri Jun 10 17:25:26 2016 +0000
+++ b/sx1272/sx1272-hal.h	Tue Jun 14 08:13:41 2016 +0000
@@ -58,6 +58,8 @@
 #elif defined ( TARGET_MTS_MDOT_F411RE )
     DigitalOut TxCtl;
     DigitalOut RxCtl;
+#elif defined ( TARGET_MBED_LPC1768 )
+    // nothing extra needed
 #else
     DigitalInOut AntSwitch;
     DigitalIn Fake;
@@ -69,11 +71,13 @@
 public:
     SX1272MB2xAS( RadioEvents_t *events,
             PinName mosi, PinName miso, PinName sclk, PinName nss, PinName reset,
-            PinName dio0, PinName dio1, PinName dio2, PinName dio3, PinName dio4, PinName dio5,
+            PinName dio0, PinName dio1, PinName dio2, PinName dio3, PinName dio4, PinName dio5
 #if defined ( TARGET_MOTE_L152RC )
-            PinName rfSwitchCntr1, PinName rfSwitchCntr2 ); 
+            ,PinName rfSwitchCntr1, PinName rfSwitchCntr2 ); 
 #elif defined ( TARGET_MTS_MDOT_F411RE )
-            PinName txctl, PinName rxctl );
+            ,PinName txctl, PinName rxctl );
+#elif defined ( TARGET_MBED_LPC1768 )
+            );
 #else
             PinName antSwitch ); 
 #endif