Skip to content

Wire1 was not declared in this scope #49

Closed
@troglodisme

Description

@troglodisme

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions