[RF69] further fix for sync word length

This commit is contained in:
Linar Yusupov 2025-03-08 13:02:05 +03:00 committed by GitHub
parent 15745bbd1d
commit 77db225396
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -712,7 +712,7 @@ int16_t RF69::setSyncWord(const uint8_t* syncWord, size_t len, uint8_t maxErrBit
RADIOLIB_ASSERT(state);
// set the length
state = this->mod->SPIsetRegValue(RADIOLIB_RF69_REG_SYNC_CONFIG, len-1, 5, 3);
state = this->mod->SPIsetRegValue(RADIOLIB_RF69_REG_SYNC_CONFIG, (len-1)<<3, 5, 3);
// set sync word register
this->mod->SPIwriteRegisterBurst(RADIOLIB_RF69_REG_SYNC_VALUE_1, syncWord, len);