Skip to content

Commit

Permalink
Debugging rework
Browse files Browse the repository at this point in the history
  • Loading branch information
jgromes committed Mar 10, 2024
1 parent 9774a22 commit 4ee17cc
Show file tree
Hide file tree
Showing 19 changed files with 265 additions and 211 deletions.
79 changes: 65 additions & 14 deletions src/BuildOpt.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@
* Debug output enable.
* Warning: Debug output will slow down the whole system significantly.
* Also, it will result in larger compiled binary.
* Levels: debug - only main info
* verbose - full transcript of all SPI communication
* Levels: basic - only main info
* protocol - mainly LoRaWAN stuff, but other protocols as well
* SPI - full transcript of all SPI communication
*/
#if !defined(RADIOLIB_DEBUG)
#define RADIOLIB_DEBUG (0)
#if !defined(RADIOLIB_DEBUG_BASIC)
#define RADIOLIB_DEBUG_BASIC (0)
#endif
#if !defined(RADIOLIB_VERBOSE)
#define RADIOLIB_VERBOSE (0)
#if !defined(RADIOLIB_DEBUG_PROTOCOL)
#define RADIOLIB_DEBUG_PROTOCOL (0)
#endif
#if !defined(RADIOLIB_DEBUG_SPI)
#define RADIOLIB_DEBUG_SPI (0)
#endif

// set which output port should be used for debug output
Expand Down Expand Up @@ -469,38 +473,85 @@
#define RADIOLIB_EXCLUDE_STM32WLX (1)
#endif

// set the global debug mode flag
#if RADIOLIB_DEBUG_BASIC || RADIOLIB_DEBUG_PROTOCOL || RADIOLIB_DEBUG_SPI
#define RADIOLIB_DEBUG (1)
#else
#define RADIOLIB_DEBUG (0)
#endif

#if RADIOLIB_DEBUG
#if defined(RADIOLIB_BUILD_ARDUINO)
#define RADIOLIB_DEBUG_PRINT(...) Module::serialPrintf(__VA_ARGS__)
#define RADIOLIB_DEBUG_PRINTLN(M, ...) Module::serialPrintf(M "\n", ##__VA_ARGS__)
#define RADIOLIB_DEBUG_PRINT_LVL(LEVEL, M, ...) Module::serialPrintf(LEVEL "" M, ##__VA_ARGS__)
#define RADIOLIB_DEBUG_PRINTLN_LVL(LEVEL, M, ...) Module::serialPrintf(LEVEL "" M "\n", ##__VA_ARGS__)

// some platforms do not support printf("%f"), so it has to be done this way
#define RADIOLIB_DEBUG_PRINT_FLOAT(VAL, DECIMALS) RADIOLIB_DEBUG_PORT.print(VAL, DECIMALS)
#define RADIOLIB_DEBUG_PRINT_FLOAT(LEVEL, VAL, DECIMALS) RADIOLIB_DEBUG_PRINT(LEVEL); RADIOLIB_DEBUG_PORT.print(VAL, DECIMALS)
#else
#if !defined(RADIOLIB_DEBUG_PRINT)
#define RADIOLIB_DEBUG_PRINT(...) fprintf(RADIOLIB_DEBUG_PORT, __VA_ARGS__)
#define RADIOLIB_DEBUG_PRINT_LVL(LEVEL, M, ...) fprintf(RADIOLIB_DEBUG_PORT, LEVEL "" M, ##__VA_ARGS__)
#endif
#if !defined(RADIOLIB_DEBUG_PRINTLN)
#define RADIOLIB_DEBUG_PRINTLN(M, ...) fprintf(RADIOLIB_DEBUG_PORT, M "\n", ##__VA_ARGS__)
#define RADIOLIB_DEBUG_PRINTLN_LVL(LEVEL, M, ...) fprintf(RADIOLIB_DEBUG_PORT, LEVEL "" M "\n", ##__VA_ARGS__)
#endif
#define RADIOLIB_DEBUG_PRINT_FLOAT(VAL, DECIMALS) RADIOLIB_DEBUG_PRINT("%.3f", VAL)
#define RADIOLIB_DEBUG_PRINT_FLOAT(LEVEL, VAL, DECIMALS) RADIOLIB_DEBUG_PRINT(LEVEL "%.3f", VAL)
#endif
#define RADIOLIB_DEBUG_HEXDUMP(...) Module::hexdump(__VA_ARGS__)

#define RADIOLIB_DEBUG_HEXDUMP(LEVEL, ...) RADIOLIB_DEBUG_PRINT(LEVEL); Module::hexdump(__VA_ARGS__)
#else
#define RADIOLIB_DEBUG_PRINT(...) {}
#define RADIOLIB_DEBUG_PRINTLN(...) {}
#define RADIOLIB_DEBUG_PRINT_FLOAT(VAL, DECIMALS) {}
#define RADIOLIB_DEBUG_HEXDUMP(...) {}
#endif

#if RADIOLIB_VERBOSE
#define RADIOLIB_VERBOSE_PRINT(...) RADIOLIB_DEBUG_PRINT(__VA_ARGS__)
#define RADIOLIB_VERBOSE_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN(__VA_ARGS__)
#if RADIOLIB_DEBUG_BASIC
#define RADIOLIB_DEBUG_BASIC_PRINT(...) RADIOLIB_DEBUG_PRINT_LVL("RLB_DBG: ", __VA_ARGS__)
#define RADIOLIB_DEBUG_BASIC_PRINT_NOTAG(...) RADIOLIB_DEBUG_PRINT_LVL("", __VA_ARGS__)
#define RADIOLIB_DEBUG_BASIC_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN_LVL("RLB_DBG: ", __VA_ARGS__)
#define RADIOLIB_DEBUG_BASIC_PRINT_FLOAT(...) RADIOLIB_DEBUG_PRINT_FLOAT("RLB_DBG: ", __VA_ARGS__);
#define RADIOLIB_DEBUG_BASIC_HEXDUMP(...) RADIOLIB_DEBUG_HEXDUMP("RLB_DBG: ", __VA_ARGS__);
#else
#define RADIOLIB_DEBUG_BASIC_PRINT(...) {}
#define RADIOLIB_DEBUG_BASIC_PRINT_NOTAG(...) {}
#define RADIOLIB_DEBUG_BASIC_PRINTLN(...) {}
#define RADIOLIB_DEBUG_BASIC_PRINT_FLOAT(...) {}
#define RADIOLIB_DEBUG_BASIC_HEXDUMP(...) {}
#endif

#if RADIOLIB_DEBUG_PROTOCOL
#define RADIOLIB_DEBUG_PROTOCOL_PRINT(...) RADIOLIB_DEBUG_PRINT_LVL("RLB_PRO: ", __VA_ARGS__)
#define RADIOLIB_DEBUG_PROTOCOL_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN_LVL("RLB_PRO: ", __VA_ARGS__)
#define RADIOLIB_DEBUG_PROTOCOL_PRINT_FLOAT(...) RADIOLIB_DEBUG_PRINT_FLOAT("RLB_PRO: ", __VA_ARGS__);
#define RADIOLIB_DEBUG_PROTOCOL_HEXDUMP(...) RADIOLIB_DEBUG_HEXDUMP("RLB_PRO: ", __VA_ARGS__);
#else
#define RADIOLIB_DEBUG_PROTOCOL_PRINT(...) {}
#define RADIOLIB_DEBUG_PROTOCOL_PRINTLN(...) {}
#define RADIOLIB_DEBUG_PROTOCOL_PRINT_FLOAT(...) {}
#define RADIOLIB_DEBUG_PROTOCOL_HEXDUMP(...) {}
#endif

#if RADIOLIB_DEBUG_SPI
#define RADIOLIB_DEBUG_SPI_PRINT(...) RADIOLIB_DEBUG_PRINT_LVL("RLB_SPI: ", __VA_ARGS__)
#define RADIOLIB_DEBUG_SPI_PRINT_NOTAG(...) RADIOLIB_DEBUG_PRINT_LVL("", __VA_ARGS__)
#define RADIOLIB_DEBUG_SPI_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN_LVL("RLB_SPI: ", __VA_ARGS__)
#define RADIOLIB_DEBUG_SPI_PRINTLN_NOTAG(...) RADIOLIB_DEBUG_PRINTLN_LVL("", __VA_ARGS__)
#define RADIOLIB_DEBUG_SPI_PRINT_FLOAT(...) RADIOLIB_DEBUG_PRINT_FLOAT("RLB_SPI: ", __VA_ARGS__);
#define RADIOLIB_DEBUG_SPI_HEXDUMP(...) RADIOLIB_DEBUG_HEXDUMP("RLB_SPI: ", __VA_ARGS__);
#else
#define RADIOLIB_VERBOSE_PRINT(...) {}
#define RADIOLIB_VERBOSE_PRINTLN(...) {}
#define RADIOLIB_DEBUG_SPI_PRINT(...) {}
#define RADIOLIB_DEBUG_SPI_PRINT_NOTAG(...) {}
#define RADIOLIB_DEBUG_SPI_PRINTLN(...) {}
#define RADIOLIB_DEBUG_SPI_PRINTLN_NOTAG(...) {}
#define RADIOLIB_DEBUG_SPI_PRINT_FLOAT(...) {}
#define RADIOLIB_DEBUG_SPI_HEXDUMP(...) {}
#endif


/*!
\brief A simple assert macro, will return on error.
*/
Expand Down
5 changes: 3 additions & 2 deletions src/BuildOptUser.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
// most commonly, RADIOLIB_EXCLUDE_* macros
// or enabling debug output

//#define RADIOLIB_DEBUG (1)
//#define RADIOLIB_VERBOSE (1)
//#define RADIOLIB_DEBUG_BASIC (1) // basic debugging (e.g. reporting GPIO timeouts or module not being found)
//#define RADIOLIB_DEBUG_PROTOCOL (1) // protocol information (e.g. LoRaWAN internal information)
//#define RADIOLIB_DEBUG_SPI (1) // verbose transcription of all SPI communication - produces large debug logs!

#endif
67 changes: 35 additions & 32 deletions src/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ void Module::init() {
this->hal->init();
this->hal->pinMode(csPin, this->hal->GpioModeOutput);
this->hal->digitalWrite(csPin, this->hal->GpioLevelHigh);
RADIOLIB_DEBUG_PRINTLN("\nRadioLib Debug Info");
RADIOLIB_DEBUG_PRINTLN("Version: %d.%d.%d.%d", RADIOLIB_VERSION_MAJOR, RADIOLIB_VERSION_MINOR, RADIOLIB_VERSION_PATCH, RADIOLIB_VERSION_EXTRA);
RADIOLIB_DEBUG_PRINTLN("Platform: " RADIOLIB_PLATFORM);
RADIOLIB_DEBUG_PRINTLN("Compiled: " __DATE__ " " __TIME__ "\n");
RADIOLIB_DEBUG_BASIC_PRINTLN("RadioLib Debug Info");
RADIOLIB_DEBUG_BASIC_PRINTLN("Version: %d.%d.%d.%d", RADIOLIB_VERSION_MAJOR, RADIOLIB_VERSION_MINOR, RADIOLIB_VERSION_PATCH, RADIOLIB_VERSION_EXTRA);
RADIOLIB_DEBUG_BASIC_PRINTLN("Platform: " RADIOLIB_PLATFORM);
RADIOLIB_DEBUG_BASIC_PRINTLN("Compiled: " __DATE__ " " __TIME__ "\n");
}

void Module::term() {
Expand Down Expand Up @@ -89,14 +89,14 @@ int16_t Module::SPIsetRegValue(uint16_t reg, uint8_t value, uint8_t msb, uint8_t
}

// check failed, print debug info
RADIOLIB_DEBUG_PRINTLN();
RADIOLIB_DEBUG_PRINTLN("address:\t0x%X", reg);
RADIOLIB_DEBUG_PRINTLN("bits:\t\t%d %d", msb, lsb);
RADIOLIB_DEBUG_PRINTLN("value:\t\t0x%X", value);
RADIOLIB_DEBUG_PRINTLN("current:\t0x%X", currentValue);
RADIOLIB_DEBUG_PRINTLN("mask:\t\t0x%X", mask);
RADIOLIB_DEBUG_PRINTLN("new:\t\t0x%X", newValue);
RADIOLIB_DEBUG_PRINTLN("read:\t\t0x%X", readValue);
RADIOLIB_DEBUG_SPI_PRINTLN();
RADIOLIB_DEBUG_SPI_PRINTLN("address:\t0x%X", reg);
RADIOLIB_DEBUG_SPI_PRINTLN("bits:\t\t%d %d", msb, lsb);
RADIOLIB_DEBUG_SPI_PRINTLN("value:\t\t0x%X", value);
RADIOLIB_DEBUG_SPI_PRINTLN("current:\t0x%X", currentValue);
RADIOLIB_DEBUG_SPI_PRINTLN("mask:\t\t0x%X", mask);
RADIOLIB_DEBUG_SPI_PRINTLN("new:\t\t0x%X", newValue);
RADIOLIB_DEBUG_SPI_PRINTLN("read:\t\t0x%X", readValue);

return(RADIOLIB_ERR_SPI_WRITE_FAILED);
#else
Expand Down Expand Up @@ -182,19 +182,19 @@ void Module::SPItransfer(uint8_t cmd, uint16_t reg, uint8_t* dataOut, uint8_t* d
}

// print debug information
#if RADIOLIB_VERBOSE
#if RADIOLIB_DEBUG_SPI
uint8_t* debugBuffPtr = NULL;
if(cmd == SPIwriteCommand) {
RADIOLIB_VERBOSE_PRINT("W\t%X\t", reg);
RADIOLIB_DEBUG_SPI_PRINT("W\t%X\t", reg);
debugBuffPtr = &buffOut[this->SPIaddrWidth/8];
} else if(cmd == SPIreadCommand) {
RADIOLIB_VERBOSE_PRINT("R\t%X\t", reg);
RADIOLIB_DEBUG_SPI_PRINT("R\t%X\t", reg);
debugBuffPtr = &buffIn[this->SPIaddrWidth/8];
}
for(size_t n = 0; n < numBytes; n++) {
RADIOLIB_VERBOSE_PRINT("%X\t", debugBuffPtr[n]);
RADIOLIB_DEBUG_SPI_PRINT_NOTAG("%X\t", debugBuffPtr[n]);
}
RADIOLIB_VERBOSE_PRINTLN();
RADIOLIB_DEBUG_SPI_PRINTLN_NOTAG();
#endif

#if !RADIOLIB_STATIC_ONLY
Expand Down Expand Up @@ -291,7 +291,7 @@ int16_t Module::SPItransferStream(uint8_t* cmd, uint8_t cmdLen, bool write, uint
while(this->hal->digitalRead(this->gpioPin)) {
this->hal->yield();
if(this->hal->millis() - start >= timeout) {
RADIOLIB_DEBUG_PRINTLN("GPIO pre-transfer timeout, is it connected?");
RADIOLIB_DEBUG_BASIC_PRINTLN("GPIO pre-transfer timeout, is it connected?");
#if !RADIOLIB_STATIC_ONLY
delete[] buffOut;
delete[] buffIn;
Expand All @@ -318,7 +318,7 @@ int16_t Module::SPItransferStream(uint8_t* cmd, uint8_t cmdLen, bool write, uint
while(this->hal->digitalRead(this->gpioPin)) {
this->hal->yield();
if(this->hal->millis() - start >= timeout) {
RADIOLIB_DEBUG_PRINTLN("GPIO post-transfer timeout, is it connected?");
RADIOLIB_DEBUG_BASIC_PRINTLN("GPIO post-transfer timeout, is it connected?");
#if !RADIOLIB_STATIC_ONLY
delete[] buffOut;
delete[] buffIn;
Expand All @@ -342,31 +342,34 @@ int16_t Module::SPItransferStream(uint8_t* cmd, uint8_t cmdLen, bool write, uint
}

// print debug information
#if RADIOLIB_VERBOSE
#if RADIOLIB_DEBUG_SPI
// print command byte(s)
RADIOLIB_VERBOSE_PRINT("CMD");
RADIOLIB_DEBUG_SPI_PRINT("CMD");
if(write) {
RADIOLIB_VERBOSE_PRINT("W\t");
RADIOLIB_DEBUG_SPI_PRINT_NOTAG("W\t");
} else {
RADIOLIB_VERBOSE_PRINT("R\t");
RADIOLIB_DEBUG_SPI_PRINT_NOTAG("R\t");
}
size_t n = 0;
for(; n < cmdLen; n++) {
RADIOLIB_VERBOSE_PRINT("%X\t", cmd[n]);
RADIOLIB_DEBUG_SPI_PRINT_NOTAG("%X\t", cmd[n]);
}
RADIOLIB_VERBOSE_PRINTLN();
RADIOLIB_DEBUG_SPI_PRINTLN_NOTAG();

// print data bytes
RADIOLIB_VERBOSE_PRINT("SI\t");
RADIOLIB_DEBUG_SPI_PRINT("SI\t");
for(n = 0; n < cmdLen; n++) {
RADIOLIB_DEBUG_SPI_PRINT_NOTAG("\t");
}
for(; n < buffLen; n++) {
RADIOLIB_VERBOSE_PRINT("%X\t", buffOut[n]);
RADIOLIB_DEBUG_SPI_PRINT_NOTAG("%X\t", buffOut[n]);
}
RADIOLIB_VERBOSE_PRINTLN();
RADIOLIB_VERBOSE_PRINT("SO\t");
for(n = cmdLen; n < buffLen; n++) {
RADIOLIB_VERBOSE_PRINT("%X\t", buffIn[n]);
RADIOLIB_DEBUG_SPI_PRINTLN_NOTAG();
RADIOLIB_DEBUG_SPI_PRINT("SO\t");
for(n = 0; n < buffLen; n++) {
RADIOLIB_DEBUG_SPI_PRINT_NOTAG("%X\t", buffIn[n]);
}
RADIOLIB_VERBOSE_PRINTLN();
RADIOLIB_DEBUG_SPI_PRINTLN_NOTAG();
#endif

#if !RADIOLIB_STATIC_ONLY
Expand Down
9 changes: 4 additions & 5 deletions src/modules/CC1101/CC1101.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ int16_t CC1101::begin(float freq, float br, float freqDev, float rxBw, int8_t pw
if((version == RADIOLIB_CC1101_VERSION_CURRENT) || (version == RADIOLIB_CC1101_VERSION_LEGACY) || (version == RADIOLIB_CC1101_VERSION_CLONE)) {
flagFound = true;
} else {
RADIOLIB_DEBUG_PRINTLN("CC1101 not found! (%d of 10 tries) RADIOLIB_CC1101_REG_VERSION == 0x%04X, expected 0x0004/0x0014", i + 1, version);
RADIOLIB_DEBUG_BASIC_PRINTLN("CC1101 not found! (%d of 10 tries) RADIOLIB_CC1101_REG_VERSION == 0x%04X, expected 0x0004/0x0014", i + 1, version);
this->mod->hal->delay(10);
i++;
}
}

if(!flagFound) {
RADIOLIB_DEBUG_PRINTLN("No CC1101 found!");
RADIOLIB_DEBUG_BASIC_PRINTLN("No CC1101 found!");
this->mod->term();
return(RADIOLIB_ERR_CHIP_NOT_FOUND);
} else {
RADIOLIB_DEBUG_PRINTLN("M\tCC1101");
RADIOLIB_DEBUG_BASIC_PRINTLN("M\tCC1101");
}

// configure settings not accessible by API
Expand Down Expand Up @@ -916,7 +916,6 @@ void CC1101::setRfSwitchTable(const uint32_t (&pins)[Module::RFSWITCH_MAX_PINS],
uint8_t CC1101::randomByte() {
// set mode to Rx
SPIsendCommand(RADIOLIB_CC1101_CMD_RX);
RADIOLIB_DEBUG_PRINTLN("CC1101::randomByte");

// wait a bit for the RSSI reading to stabilise
this->mod->hal->delay(10);
Expand Down Expand Up @@ -1113,7 +1112,7 @@ void CC1101::SPIsendCommand(uint8_t cmd) {
// stop transfer
this->mod->hal->spiEndTransaction();
this->mod->hal->digitalWrite(this->mod->getCs(), this->mod->hal->GpioLevelHigh);
RADIOLIB_VERBOSE_PRINTLN("CMD\tW\t%02X\t%02X", cmd, status);
RADIOLIB_DEBUG_SPI_PRINTLN("CMD\tW\t%02X\t%02X", cmd, status);
(void)status;
}

Expand Down
6 changes: 3 additions & 3 deletions src/modules/RF69/RF69.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ int16_t RF69::begin(float freq, float br, float freqDev, float rxBw, int8_t pwr,
if(version == RADIOLIB_RF69_CHIP_VERSION) {
flagFound = true;
} else {
RADIOLIB_DEBUG_PRINTLN("RF69 not found! (%d of 10 tries) RADIOLIB_RF69_REG_VERSION == 0x%04X, expected 0x0024", i + 1, version);
RADIOLIB_DEBUG_BASIC_PRINTLN("RF69 not found! (%d of 10 tries) RADIOLIB_RF69_REG_VERSION == 0x%04X, expected 0x0024", i + 1, version);
this->mod->hal->delay(10);
i++;
}
}

if(!flagFound) {
RADIOLIB_DEBUG_PRINTLN("No RF69 found!");
RADIOLIB_DEBUG_BASIC_PRINTLN("No RF69 found!");
this->mod->term();
return(RADIOLIB_ERR_CHIP_NOT_FOUND);
} else {
RADIOLIB_DEBUG_PRINTLN("M\tRF69");
RADIOLIB_DEBUG_BASIC_PRINTLN("M\tRF69");
}

// configure settings not accessible by API
Expand Down
8 changes: 4 additions & 4 deletions src/modules/SX123x/SX1231.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ int16_t SX1231::begin(float freq, float br, float freqDev, float rxBw, int8_t po
flagFound = true;
this->chipRevision = version;
} else {
RADIOLIB_DEBUG_PRINTLN("SX1231 not found! (%d of 10 tries) RF69_REG_VERSION == 0x%04X, expected 0x0021 / 0x0022 / 0x0023", i + 1, version);
RADIOLIB_DEBUG_BASIC_PRINTLN("SX1231 not found! (%d of 10 tries) RF69_REG_VERSION == 0x%04X, expected 0x0021 / 0x0022 / 0x0023", i + 1, version);
mod->hal->delay(10);
i++;
}
}

if(!flagFound) {
RADIOLIB_DEBUG_PRINTLN("No SX1231 found!");
RADIOLIB_DEBUG_BASIC_PRINTLN("No SX1231 found!");
mod->term();
return(RADIOLIB_ERR_CHIP_NOT_FOUND);
}
RADIOLIB_DEBUG_PRINTLN("M\tSX1231");
RADIOLIB_DEBUG_BASIC_PRINTLN("M\tSX1231");

// configure settings not accessible by API
int16_t state = config();
RADIOLIB_ASSERT(state);
RADIOLIB_DEBUG_PRINTLN("M\tRF69");
RADIOLIB_DEBUG_BASIC_PRINTLN("M\tRF69");

// configure publicly accessible settings
state = setFrequency(freq);
Expand Down
8 changes: 4 additions & 4 deletions src/modules/SX123x/SX1233.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ int16_t SX1233::begin(float freq, float br, float freqDev, float rxBw, int8_t po
flagFound = true;
this->chipRevision = version;
} else {
RADIOLIB_DEBUG_PRINTLN("SX1231 not found! (%d of 10 tries) RF69_REG_VERSION == 0x%04X, expected 0x0021 / 0x0022 / 0x0023", i + 1, version);
RADIOLIB_DEBUG_BASIC_PRINTLN("SX1231 not found! (%d of 10 tries) RF69_REG_VERSION == 0x%04X, expected 0x0021 / 0x0022 / 0x0023", i + 1, version);
mod->hal->delay(10);
i++;
}
}

if(!flagFound) {
RADIOLIB_DEBUG_PRINTLN("No SX1233 found!");
RADIOLIB_DEBUG_BASIC_PRINTLN("No SX1233 found!");
mod->term();
return(RADIOLIB_ERR_CHIP_NOT_FOUND);
}
RADIOLIB_DEBUG_PRINTLN("M\tSX1233");
RADIOLIB_DEBUG_BASIC_PRINTLN("M\tSX1233");

// configure settings not accessible by API
int16_t state = config();
RADIOLIB_ASSERT(state);
RADIOLIB_DEBUG_PRINTLN("M\tRF69");
RADIOLIB_DEBUG_BASIC_PRINTLN("M\tRF69");

// configure publicly accessible settings
state = setFrequency(freq);
Expand Down
Loading

0 comments on commit 4ee17cc

Please sign in to comment.