r g / SX1276GenericLib-us915

Dependents:   DISCO-L072CZ-LRWAN1_LoRa_PingPong

Fork of SX1276GenericLib by Helmut Tschemernjak

Files at this revision

API Documentation at this revision

Comitter:
Helmut Tschemernjak
Date:
Mon May 08 15:39:42 2017 +0200
Parent:
40:0165543c0986
Child:
42:72deced1a4c4
Commit message:
Added correct MURATA boost case

Changed in this revision

LoRa_TODO.txt Show annotated file Show diff for this revision Revisions of this file
sx1276/sx1276-mbed-hal.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/LoRa_TODO.txt	Mon May 08 09:57:28 2017 +0200
+++ b/LoRa_TODO.txt	Mon May 08 15:39:42 2017 +0200
@@ -3,8 +3,6 @@
 Move finished tasks to Done section:
 
 - Check of the MURATA TCXO config is correct
-- What needs to e done in the MURATA PA_BOOST case
-- Verify the Murata ANT Switch code.
 - Make the timers more generic and move the OS code into the HAL layer.
 - add support for Arduino - add sx1276-Arduino-hal.h/cpp
 - add support for Linux - add sx1276-Linux-hal.h/cpp
@@ -16,11 +14,12 @@
   this feature is not so important, however the current implementation
   is very basic.
 
-
 
 
 Done:
 - Started a Generic SX1276 driver to support all SX1276 modules (May-2017 Helmut)
 - Migrated typedefs code into sx1276.h (7-May-2017 Helmut)
 - Migrated enum code into sx1276.h/radio.h (7-May-2017 Helmut)
+- Verify the Murata ANT Switch code
+- MURATA PA_BOOST case,is _antSwitchTXBoost right? (Same as STM sample code)
 
--- a/sx1276/sx1276-mbed-hal.cpp	Mon May 08 09:57:28 2017 +0200
+++ b/sx1276/sx1276-mbed-hal.cpp	Mon May 08 15:39:42 2017 +0200
@@ -311,8 +311,10 @@
         case RFLR_OPMODE_TRANSMITTER:
             if (boardConnected == MURATA_SX1276) {
 	            *_antSwitch = 0;// Murata-RX
-	            *_antSwitchTX = 1; 	// alternate: antSwitchTXBoost = 1
-                *_antSwitchTXBoost = 0;
+                if (Read( REG_PACONFIG) & RF_PACONFIG_PASELECT_PABOOST)
+                    *_antSwitchTXBoost = 1;
+            	else
+               		*_antSwitchTX = 1; 	// alternate: antSwitchTXBoost = 1
             } else {
                 if (_antSwitch)
 	        		*_antSwitch = 1;
@@ -330,6 +332,8 @@
         			_antSwitch = 0;
             }
             break;
+        case RFLR_OPMODE_SLEEP:
+        case RFLR_OPMODE_STANDBY:
         default:
             if (boardConnected == MURATA_SX1276) {
                 *_antSwitch = 0;  //Murata-RX