SX1276 library for modtronix inair9. Edited for use with NRF51DK board.

Dependents:   InAir9_PingPong

Fork of SX1276Lib_modtronix by modtronix H

Revision:
26:ad32782125eb
Parent:
25:72381be1b0ce
diff -r 72381be1b0ce -r ad32782125eb sx1276/sx1276.cpp
--- a/sx1276/sx1276.cpp	Wed Jul 29 12:07:40 2015 +1000
+++ b/sx1276/sx1276.cpp	Sun Nov 19 18:19:55 2017 +0000
@@ -14,6 +14,8 @@
 */
 #include "sx1276.h"
 
+Serial      pc1(USBTX, USBRX); 
+
 const FskBandwidth_t SX1276::FskBandwidths[] =
 {       
     { 2600  , 0x17 },   
@@ -741,6 +743,12 @@
 
 void SX1276::Rx( uint32_t timeout )
 {
+    // configure uart port
+    pc1.baud(9600);
+    pc1.format(8, SerialBase::None, 1);
+    pc1.printf("PC printing enabled\n\r");
+    wait(2);
+    
     bool rxContinuous = false;
 
     switch( this->settings.Modem )
@@ -775,6 +783,9 @@
         break;
     case MODEM_LORA:
         {
+            
+            pc1.printf("MODEM_LORA enabled \n\r");
+            
             if( this->settings.LoRa.IqInverted == true )
             {
                 Write( REG_LR_INVERTIQ, ( ( Read( REG_LR_INVERTIQ ) & RFLR_INVERTIQ_TX_MASK & RFLR_INVERTIQ_RX_MASK ) | RFLR_INVERTIQ_RX_ON | RFLR_INVERTIQ_TX_OFF ) );
@@ -821,9 +832,13 @@
         break;
     }
 
+	//this->settings.State
+	pc1.printf("got to memset and setting RX_DONE\n\r");
+
     memset( rxBuffer, 0, ( size_t )RX_BUFFER_SIZE );
 
     this->settings.State = RX_DONE;
+    
     if( timeout != 0 )
     {
         rxTimeoutTimer.attach_us( this, &SX1276::OnTimeoutIrq, timeout );