I-O DATA DEV2 / Private_lora_SX1276

Dependents:   Nucleo_Private_LoRa

Revision:
29:cc4c7c1defca
Parent:
25:3778e6204cc1
--- a/sx1276/sx1276.cpp	Wed Nov 25 08:17:26 2020 +0000
+++ b/sx1276/sx1276.cpp	Fri Dec 18 00:26:38 2020 +0000
@@ -395,19 +395,23 @@
 
     paConfig = Read( REG_PACONFIG );
     paDac = Read( REG_PADAC );
+   printf("1 pa config %02x  dac %02x\r\n",paConfig ,paDac);
 
     paConfig = ( paConfig & RF_PACONFIG_PASELECT_MASK ) | GetPaSelect( this->settings.Channel );
     paConfig = ( paConfig & RF_PACONFIG_MAX_POWER_MASK ) | 0x70;
+   printf("2 pa config %02x  dac %02x\r\n",paConfig ,paDac);
 
     if( ( paConfig & RF_PACONFIG_PASELECT_PABOOST ) == RF_PACONFIG_PASELECT_PABOOST )
     {
         if( power > 17 )
         {
             paDac = ( paDac & RF_PADAC_20DBM_MASK ) | RF_PADAC_20DBM_ON;
+            printf("20dBm on\r\n");
         }
         else
         {
             paDac = ( paDac & RF_PADAC_20DBM_MASK ) | RF_PADAC_20DBM_OFF;
+            printf("20dBm off\r\n");
         }
         if( ( paDac & RF_PADAC_20DBM_ON ) == RF_PADAC_20DBM_ON )
         {
@@ -419,6 +423,8 @@
             {
                 power = 20;
             }
+            printf("power = %d\r\n",power);
+
             paConfig = ( paConfig & RF_PACONFIG_OUTPUTPOWER_MASK ) | ( uint8_t )( ( uint16_t )( power - 5 ) & 0x0F );
         }
         else
@@ -431,6 +437,7 @@
             {
                 power = 17;
             }
+            printf("power 2 = %d\r\n",power);
             paConfig = ( paConfig & RF_PACONFIG_OUTPUTPOWER_MASK ) | ( uint8_t )( ( uint16_t )( power - 2 ) & 0x0F );
         }
     }
@@ -444,6 +451,7 @@
         {
             power = 14;
         }
+        printf("power 3 = %d\r\n",power);
         paConfig = ( paConfig & RF_PACONFIG_OUTPUTPOWER_MASK ) | ( uint8_t )( ( uint16_t )( power + 1 ) & 0x0F );
     }
     Write( REG_PACONFIG, paConfig );