Closed estshorter closed 3 years ago
@estshorter Thank you for reporting this problem ! I fixed it in the develop branch. Please check it out.
Thank you for your quick response!
But, it seems that I2C_ERROR_OK
is not declared. Could you look into this again?
.pio/libdeps/m5paper/LovyanGFX/src/lgfx/v0/platforms/esp32_common.cpp: In function 'bool lgfx::v0::i2c::writeBytes(int, uint16_t, const uint8_t*, uint8_t)':
.pio/libdeps/m5paper/LovyanGFX/src/lgfx/v0/platforms/esp32_common.cpp:382:14: error: 'I2C_ERROR_OK' was not declared in this scope
return I2C_ERROR_OK == twowire.endTransmission();
^~~~~~~~~~~~
.pio/libdeps/m5paper/LovyanGFX/src/lgfx/v0/platforms/esp32_common.cpp: In function 'bool lgfx::v0::i2c::writeReadBytes(int, uint16_t, const uint8_t*, uint8_t, uint8_t*, uint8_t)':
.pio/libdeps/m5paper/LovyanGFX/src/lgfx/v0/platforms/esp32_common.cpp:404:11: error: 'I2C_ERROR_OK' was not declared in this scope
if (I2C_ERROR_OK != twowire.endTransmission(false))
^~~~~~~~~~~~
Compiling .pio\build\m5paper\libc1d\LovyanGFX\lgfx\v1\panel\Panel_Device.cpp.o
*** [.pio\build\m5paper\libc1d\LovyanGFX\lgfx\v0\platforms\esp32_common.cpp.o] Error 1
@estshorter I'm sorry. I was missing the include. I was able to fix it, so please try again.
Same error occured: I2C_ERROR_OK is not declared. It seems that the arduino-esp32 dev team also has removed i2c_err_t.
see: https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-i2c.h
@estshorter sorry again... I gave up on using the defined value and replaced it with 0.
Thank you for the fix! Now I can build flawlessly!
From commit https://github.com/espressif/arduino-esp32/commit/f87107dedb6aff148622672376ae6a4aefdfd80c in arduino-esp32,
TwoWire::readTransmission
andTwoWire::writeTransmission
have been removed and this causes build failure in LovyanGFX.The following is a build log.