You've already forked arduino-LoRa
mirror of
https://github.com/sandeepmistry/arduino-LoRa.git
synced 2025-07-06 06:42:31 +03:00
Backup and restore opcode while setting sync word
This commit is contained in:
@ -404,7 +404,15 @@ void LoRaClass::setPreambleLength(long length)
|
||||
|
||||
void LoRaClass::setSyncWord(int sw)
|
||||
{
|
||||
// backup current op mode
|
||||
byte oldOpMode = readRegister(REG_OP_MODE);
|
||||
|
||||
sleep();
|
||||
|
||||
writeRegister(REG_SYNC_WORD, sw);
|
||||
|
||||
// retore previous op mode
|
||||
writeRegister(REG_OP_MODE, oldOpMode);
|
||||
}
|
||||
|
||||
void LoRaClass::crc()
|
||||
|
Reference in New Issue
Block a user