[SX126x] Fixed bug in getDeviceErrors
This commit is contained in:
parent
8bf15941c7
commit
721962cacd
1 changed files with 1 additions and 1 deletions
|
@ -1655,7 +1655,7 @@ uint32_t SX126x::getPacketStatus() {
|
||||||
uint16_t SX126x::getDeviceErrors() {
|
uint16_t SX126x::getDeviceErrors() {
|
||||||
uint8_t data[2] = {0, 0};
|
uint8_t data[2] = {0, 0};
|
||||||
_mod->SPIreadStream(RADIOLIB_SX126X_CMD_GET_DEVICE_ERRORS, data, 2);
|
_mod->SPIreadStream(RADIOLIB_SX126X_CMD_GET_DEVICE_ERRORS, data, 2);
|
||||||
uint16_t opError = (((uint16_t)data[0] & 0xFF) << 8) & ((uint16_t)data[1]);
|
uint16_t opError = (((uint16_t)data[0] & 0xFF) << 8) | ((uint16_t)data[1]);
|
||||||
return(opError);
|
return(opError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue