Fork of SX1276 library, with setLowDataRateOptimize() function added to configure "Low Datarate Optimize" setting of chip.
Dependents: SX1276_terminal SX1276_Semtech_GUI
Fork of SX127x by
Diff: sx127x_lora.cpp
- Revision:
- 4:d987ac2836bf
- Parent:
- 3:3bf2515b1eed
- Child:
- 6:5d94ee847016
- Child:
- 7:927a05f84ede
--- a/sx127x_lora.cpp Fri May 02 01:18:59 2014 +0000 +++ b/sx127x_lora.cpp Fri May 02 23:35:30 2014 +0000 @@ -319,7 +319,7 @@ // radio doesnt provide FhssChangeChannel with channel=0 for TX if (RegHopPeriod > 0) - m_xcvr.write_reg_u24(REG_FRFMSB, m_xcvr.frfs[0]); + m_xcvr.write_u24(REG_FRFMSB, m_xcvr.frfs[0]); m_xcvr.set_opmode(RF_OPMODE_TRANSMITTER); } @@ -343,7 +343,7 @@ // shouldn't be necessary, radio should provide FhssChangeChannel with channel=0 for RX if (RegHopPeriod > 0) - m_xcvr.write_reg_u24(REG_FRFMSB, m_xcvr.frfs[0]); + m_xcvr.write_u24(REG_FRFMSB, m_xcvr.frfs[0]); m_xcvr.set_opmode(RF_OPMODE_RECEIVER); } @@ -375,7 +375,7 @@ if (m_xcvr.RegDioMapping1.bits.Dio1Mapping == 1) { if (m_xcvr.dio1) { RegHopChannel.octet = m_xcvr.read_reg(REG_LR_HOPCHANNEL); - m_xcvr.write_reg_u24(REG_FRFMSB, m_xcvr.frfs[RegHopChannel.bits.FhssPresentChannel]); + m_xcvr.write_u24(REG_FRFMSB, m_xcvr.frfs[RegHopChannel.bits.FhssPresentChannel]); printf("hopch:%d\r\n", RegHopChannel.bits.FhssPresentChannel); RegIrqFlags.octet = 0; RegIrqFlags.bits.FhssChangeChannel = 1; @@ -393,7 +393,7 @@ RegIrqFlags.octet = m_xcvr.read_reg(REG_LR_IRQFLAGS); // save flags RegHopChannel.octet = m_xcvr.read_reg(REG_LR_HOPCHANNEL); if (RegIrqFlags.bits.FhssChangeChannel) { - m_xcvr.write_reg_u24(REG_FRFMSB, m_xcvr.frfs[RegHopChannel.bits.FhssPresentChannel]); + m_xcvr.write_u24(REG_FRFMSB, m_xcvr.frfs[RegHopChannel.bits.FhssPresentChannel]); } //printf("[%02x]", RegIrqFlags.octet); m_xcvr.write_reg(REG_LR_IRQFLAGS, RegIrqFlags.octet); // clear flags in radio