Merge pull request #779 from alistair23/alistair/spi-status
modules: Don't read excess status data
This commit is contained in:
commit
f6203e5036
2 changed files with 2 additions and 2 deletions
|
@ -240,7 +240,7 @@ int16_t Module::SPIcheckStream() {
|
||||||
// get the status
|
// get the status
|
||||||
uint8_t spiStatus = 0;
|
uint8_t spiStatus = 0;
|
||||||
uint8_t cmd = this->SPIstatusCommand;
|
uint8_t cmd = this->SPIstatusCommand;
|
||||||
state = this->SPItransferStream(&cmd, 1, false, NULL, &spiStatus, 1, true, RADIOLIB_MODULE_SPI_TIMEOUT);
|
state = this->SPItransferStream(&cmd, 1, false, NULL, &spiStatus, 0, true, RADIOLIB_MODULE_SPI_TIMEOUT);
|
||||||
RADIOLIB_ASSERT(state);
|
RADIOLIB_ASSERT(state);
|
||||||
|
|
||||||
// translate to RadioLib status code
|
// translate to RadioLib status code
|
||||||
|
|
|
@ -1852,7 +1852,7 @@ int16_t SX126x::setRegulatorMode(uint8_t mode) {
|
||||||
|
|
||||||
uint8_t SX126x::getStatus() {
|
uint8_t SX126x::getStatus() {
|
||||||
uint8_t data = 0;
|
uint8_t data = 0;
|
||||||
this->mod->SPIreadStream(RADIOLIB_SX126X_CMD_GET_STATUS, &data, 1);
|
this->mod->SPIreadStream(RADIOLIB_SX126X_CMD_GET_STATUS, &data, 0);
|
||||||
return(data);
|
return(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue