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.
Fork of SX1276Lib by
Diff: sx1276/sx1276.cpp
- Revision:
- 20:e05596ba4166
- Parent:
- 19:71a47bb03fbb
- Child:
- 21:2e496deb7858
--- a/sx1276/sx1276.cpp Wed Aug 12 14:34:03 2015 +0000
+++ b/sx1276/sx1276.cpp Tue Oct 20 12:58:58 2015 +0000
@@ -992,6 +992,24 @@
}
}
+void SX1276::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;
+ }
+}
+
void SX1276::OnTimeoutIrq( void )
{
switch( this->settings.State )
@@ -1040,7 +1058,7 @@
void SX1276::OnDio0Irq( void )
{
- __IO uint8_t irqFlags = 0;
+ volatile uint8_t irqFlags = 0;
switch( this->settings.State )
{
