SX1261 and sx1262 common library

Dependents:   SX126xDevKit SX1262PingPong SX126X_TXonly SX126X_PingPong_Demo ... more

Fork of SX126xLib by Gregory Cristian

Revision:
6:1e2345700991
Parent:
5:e488e6f185f3
--- a/sx126x.cpp	Fri Mar 09 13:19:45 2018 +0000
+++ b/sx126x.cpp	Wed Jul 18 13:33:42 2018 +0000
@@ -490,7 +490,7 @@
     printf("SetTxParams ");
 #endif
 
-    if( GetDeviceType( ) == 1 ) // sx1261
+    if( GetDeviceType( ) == SX1261 )
     {
         if( power == 15 )
         {
@@ -510,7 +510,7 @@
         }
         WriteReg( REG_OCP, 0x18 ); // current max is 80 mA for the whole device
     }
-    else // sx1262
+    else // sx1262 or sx1268
     {
         SetPaConfig( 0x04, 0x07, 0x00, 0x01 );
         if( power > 22 )