Revised to support JFET LoRa Module

Fork of SX1272Liby by Timothy Mulrooney

Files at this revision

API Documentation at this revision

Comitter:
jlcolemanmbed
Date:
Sun Mar 20 19:40:55 2016 +0000
Parent:
3:73a1f904eaa5
Commit message:
Made revisions to support JFET LoRa Module on mbed platform

Changed in this revision

sx1272/sx1272-hal.cpp Show annotated file Show diff for this revision Revisions of this file
sx1272/sx1272.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 73a1f904eaa5 -r d2e72ba5e76c sx1272/sx1272-hal.cpp
--- a/sx1272/sx1272-hal.cpp	Wed Mar 09 15:13:46 2016 +0000
+++ b/sx1272/sx1272-hal.cpp	Sun Mar 20 19:40:55 2016 +0000
@@ -27,7 +27,8 @@
                             PinName antSwitch )
 #endif
 //                            : SX1272( events, mosi, miso, sclk, nss, reset, dio0, dio1, dio2, dio3, dio4, dio5 ),
-                            : SX1272( events, PTD6, PTD7, PTD5, PTD4, reset, PTC2, PTB1, PTC3, PTB0, PTC4, PTC1 ),
+//                            : SX1272( events, PTD6, PTD7, PTD5, PTD4, reset, PTC2, PTB1, PTC3, PTB0, PTC4, PTC1 ),
+                              : SX1272( events, PTC6, PTC7, PTC5, PTC4, reset, PTC8, PTC9, PTC10, PTC11, PTD0, PTD1 ),
 #if defined ( TARGET_MOTE_L152RC )
                             RfSwitchCntr1( rfSwitchCntr1 ),
                             RfSwitchCntr2( rfSwitchCntr2 ),
@@ -37,7 +38,8 @@
                             RxCtl ( rxctl )
 #else
 //                            AntSwitch( antSwitch ),
-                            AntSwitch( PTC6 ),
+//                            AntSwitch( PTC6 ),
+                              AntSwitch( PTC1 ),
                         #if( defined ( TARGET_NUCLEO_L152RE ) )
                             Fake( D8 )
                         #else
@@ -79,9 +81,9 @@
                         #else
 //                        :   SX1272( events, D11, D12, D13, D10, A0, D2, D3, D4, D5, D8, D9 ),
 //                            AntSwitch( A4 ), 
-                        :   SX1272( events, PTD6, PTD7, PTD5, PTD4, A0, PTC2, PTB1, PTC3, PTB0, PTC4, PTC1 ),
-                            AntSwitch( PTC6 ), 
-                            Fake( A3 )
+                          :   SX1272( events, PTC6, PTC7, PTC5, PTC4, A0, PTC8, PTC9, PTC10, PTC11, PTD0, PTD1 ),
+                              AntSwitch( PTC1 ),
+                              Fake( A3 )
                         #endif
 {
     this->RadioEvents = events;
diff -r 73a1f904eaa5 -r d2e72ba5e76c sx1272/sx1272.cpp
--- a/sx1272/sx1272.cpp	Wed Mar 09 15:13:46 2016 +0000
+++ b/sx1272/sx1272.cpp	Sun Mar 20 19:40:55 2016 +0000
@@ -47,11 +47,14 @@
             :   Radio( events ),
 //                spi( mosi, miso, sclk ),
 //                nss( nss ),
-                spi( PTD6, PTD7, PTD5 ),
-                nss( PTD4 ),
+//                spi( PTD6, PTD7, PTD5 ),
+                  spi( PTC6, PTC7, PTC5),
+//                nss( PTD4 ),
+                  nss( PTC4),
                 reset( reset ),
 //                dio0( dio0 ), dio1( dio1 ), dio2( dio2 ), dio3( dio3 ), dio4( dio4 ), dio5( dio5 ),
-                dio0( PTC2 ), dio1( PTB1 ), dio2( PTC3 ), dio3( PTB0 ), dio4( PTC4 ), dio5( PTC1 ),
+//                dio0( PTC2 ), dio1( PTB1 ), dio2( PTC3 ), dio3( PTB0 ), dio4( PTC4 ), dio5( PTC1 ),
+                  dio0( PTC8 ), dio1( PTC9 ), dio2( PTC10 ), dio3( PTC11 ), dio4( PTD0 ), dio5( PTD1 ),
                 isRadioActive( false )
 {
     wait_ms( 10 );