diff --git a/src/modules/CC1101/CC1101.cpp b/src/modules/CC1101/CC1101.cpp index ea3f3977..288be633 100644 --- a/src/modules/CC1101/CC1101.cpp +++ b/src/modules/CC1101/CC1101.cpp @@ -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); }