[SX126x] Cppcheck fixes
This commit is contained in:
parent
aaa48ba4d8
commit
ddd4b23e65
1 changed files with 2 additions and 2 deletions
|
@ -931,7 +931,7 @@ int16_t SX126x::setSyncWord(uint8_t syncWord, uint8_t controlBits) {
|
|||
}
|
||||
|
||||
// update register
|
||||
uint8_t data[2] = {(uint8_t)((syncWord & 0xF0) | ((controlBits & 0xF0) >> 4)), (uint8_t)(((syncWord & 0x0F) << 4) | (controlBits & 0x0F))};
|
||||
const uint8_t data[2] = {(uint8_t)((syncWord & 0xF0) | ((controlBits & 0xF0) >> 4)), (uint8_t)(((syncWord & 0x0F) << 4) | (controlBits & 0x0F))};
|
||||
return(writeRegister(RADIOLIB_SX126X_REG_LORA_SYNC_WORD_MSB, data, 2));
|
||||
}
|
||||
|
||||
|
@ -1154,7 +1154,7 @@ int16_t SX126x::setRxBoostedGainMode(bool rxbgm, bool persist) {
|
|||
// add Rx Gain register to retention memory if requested
|
||||
if(persist) {
|
||||
// values and registers below are specified in SX126x datasheet v2.1 section 9.6, just below table 9-3
|
||||
uint8_t data[] = { 0x01, (uint8_t)((RADIOLIB_SX126X_REG_RX_GAIN >> 8) & 0xFF), (uint8_t)(RADIOLIB_SX126X_REG_RX_GAIN & 0xFF) };
|
||||
const uint8_t data[] = { 0x01, (uint8_t)((RADIOLIB_SX126X_REG_RX_GAIN >> 8) & 0xFF), (uint8_t)(RADIOLIB_SX126X_REG_RX_GAIN & 0xFF) };
|
||||
state = writeRegister(RADIOLIB_SX126X_REG_RX_GAIN_RETENTION_0, data, 3);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue