Initialize state as RADIOLIB_ERR_NONE if avoiding ISR

This commit is contained in:
Crsarmv7l 2025-02-11 20:08:27 +01:00 committed by GitHub
parent 42b981d63c
commit 12fd807052
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -250,8 +250,8 @@ int16_t CC1101::startTransmit(const uint8_t* data, size_t len, uint8_t addr) {
}
// set GDO0 mapping only if we aren't refilling the FIFO
int16_t state
if (len <= RADIOLIB_CC1101_FIFO_SIZE) {
int16_t state = RADIOLIB_ERR_NONE;
if(len <= RADIOLIB_CC1101_FIFO_SIZE) {
state = SPIsetRegValue(RADIOLIB_CC1101_REG_IOCFG2, RADIOLIB_CC1101_GDOX_SYNC_WORD_SENT_OR_PKT_RECEIVED, 5, 0);
RADIOLIB_ASSERT(state);
}