Skip to content

Commit 79f6042

Browse files
committed
Fixes for ESP8266
1 parent 264281f commit 79f6042

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/components/analogIO/hardware.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,10 @@ void AnalogIOHardware::SetNativeADCResolution() {
8484
#else
8585
_native_adc_resolution = 10;
8686
#endif
87+
#ifndef ARDUINO_ARCH_ESP8266
8788
// Set the resolution (in bits) of the hardware's ADC
8889
analogReadResolution(_native_adc_resolution);
90+
#endif // ARDUINO_ARCH_ESP8266
8991
}
9092

9193
/*************************************************************************/

src/components/i2c/hardware.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ void I2cHardware::RemoveMux() {
304304
void I2cHardware::ClearMuxChannel() {
305305
if (!_has_mux)
306306
return;
307-
_bus->beginTransmission(_mux_address_register);
307+
_bus->beginTransmission((uint8_t)_mux_address_register);
308308
if (_mux_max_channels == 4)
309309
_bus->write(0b0000);
310310
else if (_mux_max_channels == 8)
@@ -322,7 +322,7 @@ void I2cHardware::ClearMuxChannel() {
322322
void I2cHardware::SelectMuxChannel(uint32_t channel) {
323323
if (channel > _mux_max_channels - 1)
324324
return;
325-
_bus->beginTransmission(_mux_address_register);
325+
_bus->beginTransmission((uint8_t)_mux_address_register);
326326
_bus->write(1 << channel);
327327
_bus->endTransmission();
328328
}

0 commit comments

Comments
 (0)