Incorrectly checking sx1280 command status (#843)
This commit is contained in:
parent
49a0a1cf44
commit
ddcce424c8
1 changed files with 3 additions and 3 deletions
|
@ -1499,11 +1499,11 @@ int16_t SX128x::config(uint8_t modem) {
|
|||
}
|
||||
|
||||
int16_t SX128x::SPIparseStatus(uint8_t in) {
|
||||
if((in & 0b00001110) == RADIOLIB_SX128X_STATUS_CMD_TIMEOUT) {
|
||||
if((in & 0b00011100) == RADIOLIB_SX128X_STATUS_CMD_TIMEOUT) {
|
||||
return(RADIOLIB_ERR_SPI_CMD_TIMEOUT);
|
||||
} else if((in & 0b00001110) == RADIOLIB_SX128X_STATUS_CMD_ERROR) {
|
||||
} else if((in & 0b00011100) == RADIOLIB_SX128X_STATUS_CMD_ERROR) {
|
||||
return(RADIOLIB_ERR_SPI_CMD_INVALID);
|
||||
} else if((in & 0b00001110) == RADIOLIB_SX128X_STATUS_CMD_FAILED) {
|
||||
} else if((in & 0b00011100) == RADIOLIB_SX128X_STATUS_CMD_FAILED) {
|
||||
return(RADIOLIB_ERR_SPI_CMD_FAILED);
|
||||
} else if((in == 0x00) || (in == 0xFF)) {
|
||||
return(RADIOLIB_ERR_CHIP_NOT_FOUND);
|
||||
|
|
Loading…
Add table
Reference in a new issue