SX1272 Ping Pong test working with the Freescale K22F microcontroller and the Semtech SX1272 evaluation module.

Fork of SX1272Lib by Timothy Mulrooney

Files at this revision

API Documentation at this revision

Comitter:
jlcolemanmbed
Date:
Thu Feb 11 14:47:16 2016 +0000
Parent:
23:273a2f93ae99
Commit message:
Revisions were made to sx1272.cpp, sx1272-hal.cpp debug.h and main.cpp in order for the Ping Pong Program to work with the Freescale K22F microcontroller and the SX1272 evaluation module.

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
sx1272/sx1272.cpp Show annotated file Show diff for this revision Revisions of this file
sx1272/sx1272.h Show annotated file Show diff for this revision Revisions of this file
diff -r 273a2f93ae99 -r f103f1004961 sx1272/sx1272-hal.cpp
--- a/sx1272/sx1272-hal.cpp	Tue Feb 09 02:05:06 2016 +0000
+++ b/sx1272/sx1272-hal.cpp	Thu Feb 11 14:47:16 2016 +0000
@@ -45,7 +45,7 @@
     RadioRegistersInit( );
 
     SetModem( MODEM_FSK );
-//    SetModem( MODEM_LORA );
+
 
     this->settings.State = RF_IDLE ;
 }
@@ -61,7 +61,7 @@
                             fake( A3 )
                         #else
                         :   SX1272( events, D11, D12, D13, D10, A0, D2, D3, D4, D5, D8, D9 ),
-                            antSwitch( A4 ), 
+                            antSwitch( PTC6 ), //changed from A4 to PTC6 by jlc
                             fake( A3 )
                         #endif
 {
@@ -83,7 +83,7 @@
     
     RadioRegistersInit( );
 
-    SetModem( MODEM_FSK );
+
 //    SetModem( MODEM_LORA );
 
     this->settings.State = RF_IDLE ;
@@ -223,7 +223,7 @@
 
 void SX1272MB1xAS::SetAntSw( uint8_t rxTx )
 {
-       debug("SetAntSw\r\n");
+       debug("SetAntSw %d\r\n",rxTx);
    if( this->rxTx == rxTx )
     {
         //no need to go further
diff -r 273a2f93ae99 -r f103f1004961 sx1272/sx1272-hal.h
--- a/sx1272/sx1272-hal.h	Tue Feb 09 02:05:06 2016 +0000
+++ b/sx1272/sx1272-hal.h	Thu Feb 11 14:47:16 2016 +0000
@@ -58,8 +58,7 @@
     
 public:
     SX1272MB1xAS( RadioEvents_t *events,
-//            PinName mosi, PinName miso, PinName sclk, PinName nss, PinName reset,
-            PinName PTD6, PinName PTD7, PinName PTD5, PinName PTD4, PinName reset,
+            PinName mosi, PinName miso, PinName sclk, PinName nss, PinName reset,
             PinName dio0, PinName dio1, PinName dio2, PinName dio3, PinName dio4, PinName dio5,
             PinName antSwitch ); 
     
diff -r 273a2f93ae99 -r f103f1004961 sx1272/sx1272.cpp
--- a/sx1272/sx1272.cpp	Tue Feb 09 02:05:06 2016 +0000
+++ b/sx1272/sx1272.cpp	Thu Feb 11 14:47:16 2016 +0000
@@ -51,7 +51,8 @@
                 spi( PTD6, PTD7, PTD5 ),
                 nss( PTD4 ),
                 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),  //added by jlc
+//              dio0( dio0 ), dio1( dio1 ), dio2( dio2 ), dio3( dio3 ), dio4( dio4 ), dio5( dio5 ),
                 isRadioActive( false )
 {
     debug("SX1272 constructor\r\n");
diff -r 273a2f93ae99 -r f103f1004961 sx1272/sx1272.h
--- a/sx1272/sx1272.h	Tue Feb 09 02:05:06 2016 +0000
+++ b/sx1272/sx1272.h	Thu Feb 11 14:47:16 2016 +0000
@@ -110,8 +110,7 @@
 
 public:
     SX1272( RadioEvents_t *events,
-//            PinName mosi, PinName miso, PinName sclk, PinName nss, PinName reset,
-            PinName PTD6, PinName PTD7, PinName PTD5, PinName PTD4, PinName reset,
+            PinName mosi, PinName miso, PinName sclk, PinName nss, PinName reset,
             PinName dio0, PinName dio1, PinName dio2, PinName dio3, PinName dio4, PinName dio5 ); 
     SX1272( RadioEvents_t *events );
     virtual ~SX1272( );