-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wire1 was not declared in this scope #49
Comments
Maybe this should include something like |
The LovyanGFX library must respect that the ESP32-C series has only one I2C interface (See espressif/arduino-esp32#10408) Please file an issue to the LovyanGFX library. |
Thanks @sivar2311 the library worked completely fine before switching to pioarduino latest platform. This happens on many Adafruit libraries as well, not just M5GFX. Did you test on your end? Thank you! |
There has been a recent change in the Arduino code which does actually set the correct number of I2C busses for the C6. |
Closing since not an pioarduino issue |
I have been using the below Tasmota platform in order to get my esp32-c6 to work
platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.08.10/platform-espressif32.zip
I wanted to upgrade to pioarduino in order to use BLE but a lot of my existing libraries won't work as Wire1 seems to not be supported when using the pioarduino platformio? I could modify this library but it's literally the same issue on many i2c devices I use.
Can anyone advise?
pio/libdeps/platformio/M5GFX/src/lgfx/v1/platforms/esp32/common.cpp: In member function 'void lgfx::v1::i2c::i2c_context_t::setPins(i2c_dev_t*, gpio_num_t, gpio_num_t)': .pio/libdeps/platformio/M5GFX/src/lgfx/v1/platforms/esp32/common.cpp:794:51: error: 'Wire1' was not declared in this scope; did you mean 'Wire'? 794 | auto twowire = ((dev == &I2C0) ? &Wire : &Wire1); | ^~~~~ | Wire .pio/libdeps/platformio/M5GFX/src/lgfx/v1/platforms/esp32/common.cpp: In function 'cpp::bitwizeshift::result<void, lgfx::v1::error_t> lgfx::v1::i2c::release(int)': .pio/libdeps/platformio/M5GFX/src/lgfx/v1/platforms/esp32/common.cpp:1003:44: error: 'Wire1' was not declared in this scope; did you mean 'Wire'? 1003 | auto twowire = ((i2c_port == 1) ? &Wire1 : &Wire); | ^~~~~ | Wire .pio/libdeps/platformio/M5GFX/src/lgfx/v1/platforms/esp32/common.cpp: In function 'cpp::bitwizeshift::result<void, lgfx::v1::error_t> lgfx::v1::i2c::setPins(int, int, int)': .pio/libdeps/platformio/M5GFX/src/lgfx/v1/platforms/esp32/common.cpp:1049:42: error: 'Wire1' was not declared in this scope; did you mean 'Wire'? 1049 | auto twowire = ((i2c_port == 1) ? &Wire1 : &Wire); | ^~~~~ | Wire .pio/libdeps/platformio/M5GFX/src/lgfx/v1/platforms/esp32/common.cpp: In function 'cpp::bitwizeshift::result<void, lgfx::v1::error_t> lgfx::v1::i2c::init(int)': .pio/libdeps/platformio/M5GFX/src/lgfx/v1/platforms/esp32/common.cpp:1071:42: error: 'Wire1' was not declared in this scope; did you mean 'Wire'? 1071 | auto twowire = ((i2c_port == 1) ? &Wire1 : &Wire); | ^~~~~ | Wire
The text was updated successfully, but these errors were encountered: