Espotel / SX1272lib-PABOOST-HW-Modification

Dependents:   LoRaWAN_Serial_port_driven_and_configurable_ELMO_based_on_TxRx_Template

Fork of SX1272lib by Espotel

Changes compared to original SX1272lib:

HW modification was made to remove RFO-output and replaced with PABOOST-output. PASELECT changed accordingly.

Revision:
8:ead3f4cc5923
Parent:
3:81cc2c384b1b
Child:
9:f53b11725565
--- a/sx1272/sx1272.cpp	Thu Oct 22 08:01:27 2015 +0000
+++ b/sx1272/sx1272.cpp	Wed Dec 16 14:25:04 2015 +0000
@@ -1384,3 +1384,21 @@
         break;
     }
 }
+
+void SX1272::SetMaxPayloadLength( ModemType modem, uint8_t max )
+{
+    this->SetModem( modem );
+
+    switch( modem )
+    {
+    case MODEM_FSK:
+        if( this->settings.Fsk.FixLen == false )
+        {
+            this->Write( REG_PAYLOADLENGTH, max );
+        }
+        break;
+    case MODEM_LORA:
+        this->Write( REG_LR_PAYLOADMAXLENGTH, max );
+        break;
+    }
+}