I made a fork of a generic library that was developed with support for RFM95 LoRa module that I found online. I Made a few changes and made it compatible with hardware limitations of the MAX32620FTHR and MAX32630FTHR module.
Dependents: MAX326xxFTHR_LoRa_RFM95 MAX326xxFTHR_LoRa_PingPong MAX326xxFTHR_RFM95_LoRa_PingPong MAX326xxFTHR_LoRa_RFM95_PingPong_Example ... more
Fork of SX1276GenericLib by
Diff: sx1276/sx1276.cpp
- Revision:
- 20:e05596ba4166
- Parent:
- 19:71a47bb03fbb
- Child:
- 21:2e496deb7858
diff -r 71a47bb03fbb -r e05596ba4166 sx1276/sx1276.cpp --- 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 ) {