From 12fd8070528caa405a183f49b0400b3141dc3ee9 Mon Sep 17 00:00:00 2001 From: Crsarmv7l <85343771+Crsarmv7l@users.noreply.github.com> Date: Tue, 11 Feb 2025 20:08:27 +0100 Subject: [PATCH] Initialize state as RADIOLIB_ERR_NONE if avoiding ISR --- src/modules/CC1101/CC1101.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }