Disambiguate i2c calls

This commit is contained in:
Scott Lahteine 2020-04-29 03:13:29 -05:00
parent 2fbce22910
commit ef43520d56
2 changed files with 3 additions and 3 deletions

View file

@ -43,7 +43,7 @@ xyze_uint_t mcp4728_values;
*/ */
void mcp4728_init() { void mcp4728_init() {
Wire.begin(); Wire.begin();
Wire.requestFrom(I2C_ADDRESS(DAC_DEV_ADDRESS), 24); Wire.requestFrom(I2C_ADDRESS(DAC_DEV_ADDRESS), uint8_t(24));
while (Wire.available()) { while (Wire.available()) {
char deviceID = Wire.read(), char deviceID = Wire.read(),
hiByte = Wire.read(), hiByte = Wire.read(),

View file

@ -305,7 +305,7 @@ int32_t I2CPositionEncoder::get_raw_count() {
encoderCount.val = 0x00; encoderCount.val = 0x00;
if (Wire.requestFrom(I2C_ADDRESS(i2cAddress), 3) != 3) { if (Wire.requestFrom(I2C_ADDRESS(i2cAddress), uint8_t(3)) != 3) {
//houston, we have a problem... //houston, we have a problem...
H = I2CPE_MAG_SIG_NF; H = I2CPE_MAG_SIG_NF;
return 0; return 0;
@ -744,7 +744,7 @@ void I2CPositionEncodersMgr::report_module_firmware(const uint8_t address) {
Wire.endTransmission(); Wire.endTransmission();
// Read value // Read value
if (Wire.requestFrom(I2C_ADDRESS(address), 32)) { if (Wire.requestFrom(I2C_ADDRESS(address), uint8_t(32))) {
char c; char c;
while (Wire.available() > 0 && (c = (char)Wire.read()) > 0) while (Wire.available() > 0 && (c = (char)Wire.read()) > 0)
SERIAL_ECHO(c); SERIAL_ECHO(c);