mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-27 06:11:25 +01:00
Prepare HAL device drivers to support Extended I2C Addresses
Cast I2CAddress variables in DIAG calls to (int).
This commit is contained in:
parent
d5a394d4e6
commit
9435869ee3
@ -322,7 +322,7 @@ bool IODevice::checkNoOverlap(VPIN firstPin, uint8_t nPins, uint8_t i2cAddress)
|
||||
}
|
||||
// Check for overlapping I2C address
|
||||
if (i2cAddress && dev->_I2CAddress==i2cAddress) {
|
||||
DIAG(F("WARNING HAL Overlap. i2c Addr 0x%x ignored."),i2cAddress);
|
||||
DIAG(F("WARNING HAL Overlap. i2c Addr 0x%x ignored."),(int)i2cAddress);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ private:
|
||||
break;
|
||||
}
|
||||
} else { // error status
|
||||
DIAG(F("ADS111x I2C:x%d Error:%d %S"), (int)_I2CAddress, status, I2CManager.getErrorMessage(status));
|
||||
DIAG(F("ADS111x I2C:x%x Error:%d %S"), (int)_I2CAddress, status, I2CManager.getErrorMessage(status));
|
||||
_deviceState = DEVSTATE_FAILED;
|
||||
}
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ private:
|
||||
}
|
||||
|
||||
void _display() override {
|
||||
DIAG(F("Rotary Encoder I2C:x%x v%d.%d.%d Configured on Vpin:%d-%d %S"), _I2CAddress, _majorVer, _minorVer, _patchVer,
|
||||
DIAG(F("Rotary Encoder I2C:x%x v%d.%d.%d Configured on Vpin:%d-%d %S"), (int)_I2CAddress, _majorVer, _minorVer, _patchVer,
|
||||
(int)_firstVpin, _firstVpin+_nPins-1, (_deviceState==DEVSTATE_FAILED) ? F("OFFLINE") : F(""));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user