[MOD] Added debug message when BUSY pin times out

This commit is contained in:
jgromes 2023-04-24 18:25:09 +02:00
parent cc8c8f2eed
commit a22a4df88f

View file

@ -251,6 +251,7 @@ int16_t Module::SPItransferStream(uint8_t* cmd, uint8_t cmdLen, bool write, uint
this->hal->yield();
if(this->hal->millis() - start >= timeout) {
this->hal->digitalWrite(this->csPin, this->hal->GpioLevelLow);
RADIOLIB_DEBUG_PRINTLN("Timed out waiting for GPIO pin, is it connected?");
return(RADIOLIB_ERR_SPI_CMD_TIMEOUT);
}
}