Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: LoRaWAN_Serial_port_driven_and_configurable_ELMO_based_on_TxRx_Template
Fork of SX1272lib by
Changes compared to original SX1272lib:
HW modification was made to remove RFO-output and replaced with PABOOST-output. PASELECT changed accordingly.
Diff: sx1272/sx1272.cpp
- Revision:
- 6:a8a402ec1169
- Parent:
- 3:81cc2c384b1b
--- a/sx1272/sx1272.cpp Thu Oct 22 08:01:27 2015 +0000
+++ b/sx1272/sx1272.cpp Wed Feb 10 10:59:51 2016 +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;
+ }
+}
