[LR11x0] Cppcheck cleanup

This commit is contained in:
jgromes 2024-05-26 08:49:02 +02:00
parent 16710d4dae
commit 6c11480416
2 changed files with 4 additions and 4 deletions

View file

@ -1573,7 +1573,7 @@ int16_t LR11x0::updateFirmware(const uint32_t* image, size_t size, bool nonvolat
state = this->getVersion(NULL, &device, NULL, NULL);
RADIOLIB_ASSERT(state);
if(device != RADIOLIB_LR11X0_DEVICE_BOOT) {
RADIOLIB_DEBUG_BASIC_PRINTLN("Failed to put device to bootloader mode, %02x != %02x", device, RADIOLIB_LR11X0_DEVICE_BOOT);
RADIOLIB_DEBUG_BASIC_PRINTLN("Failed to put device to bootloader mode, %02x != %02x", (unsigned int)device, (unsigned int)RADIOLIB_LR11X0_DEVICE_BOOT);
return(RADIOLIB_ERR_CHIP_NOT_FOUND);
}
@ -1611,7 +1611,7 @@ int16_t LR11x0::updateFirmware(const uint32_t* image, size_t size, bool nonvolat
state = this->getVersion(NULL, &device, NULL, NULL);
RADIOLIB_ASSERT(state);
if(device == RADIOLIB_LR11X0_DEVICE_BOOT) {
RADIOLIB_DEBUG_BASIC_PRINTLN("Failed to kick device from bootloader mode, %02x == %02x", device, RADIOLIB_LR11X0_DEVICE_BOOT);
RADIOLIB_DEBUG_BASIC_PRINTLN("Failed to kick device from bootloader mode, %02x == %02x", (unsigned int)device, (unsigned int)RADIOLIB_LR11X0_DEVICE_BOOT);
return(RADIOLIB_ERR_CHIP_NOT_FOUND);
}
@ -2487,7 +2487,7 @@ int16_t LR11x0::setRangingParameter(uint8_t symbolNum) {
return(this->SPIcommand(RADIOLIB_LR11X0_CMD_SET_RANGING_PARAMETER, true, buff, sizeof(buff)));
}
int16_t LR11x0::setRssiCalibration(int8_t* tune, int16_t gainOffset) {
int16_t LR11x0::setRssiCalibration(const int8_t* tune, int16_t gainOffset) {
uint8_t buff[11] = {
(uint8_t)((tune[0] & 0x0F) | (uint8_t)(tune[1] & 0x0F) << 4),
(uint8_t)((tune[2] & 0x0F) | (uint8_t)(tune[3] & 0x0F) << 4),

View file

@ -1418,7 +1418,7 @@ class LR11x0: public PhysicalLayer {
int16_t setGfskWhitParams(uint16_t seed);
int16_t setRxBoosted(bool en);
int16_t setRangingParameter(uint8_t symbolNum);
int16_t setRssiCalibration(int8_t* tune, int16_t gainOffset);
int16_t setRssiCalibration(const int8_t* tune, int16_t gainOffset);
int16_t setLoRaSyncWord(uint8_t sync);
int16_t lrFhssBuildFrame(uint8_t hdrCount, uint8_t cr, uint8_t grid, bool hop, uint8_t bw, uint16_t hopSeq, int8_t devOffset, uint8_t* payload, size_t len);
int16_t lrFhssSetSyncWord(uint32_t sync);