Skip to content
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

Error: 'Wire1' was not declared in scope on ESP32-C6 (using pioArduino) #647

Open
troglodisme opened this issue Nov 15, 2024 · 0 comments
Open

Comments

@troglodisme
Copy link

Carefully written Issues are more likely to be given priority.
丁寧に記述された報告は優先して対応される可能性が高くなります。

Environment ( 実行環境 )

MCU or Board name: ESP32-C6-WROOM-8
Panel Driver IC: Good display GDEY0154D67 (Driver IC: SSD1681)
Bus type: SPI
LovyanGFX version: 1.1.16
FrameWork version: PlatformIO Arduino
Build Environment: PlatformIO
Operating System: macOS 14.6.1

Problem Description ( 問題の内容 )

Issue related to using second i2c bus on esp32-c6 (which does not have this feature).

Expected Behavior ( 期待される動作 )

The code should compile successfully without any errors related to undefined Wire1.

Actual Behavior ( 実際の動作 )

I am encountering a compilation error related to the LovyanGFX library. The error message suggests that 'Wire1' is not declared in scope. This issue seems to occur in several parts of common.cpp. Below is the detailed error log:

`.pio/libdeps/stable/LovyanGFX/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/stable/LovyanGFX/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/stable/LovyanGFX/src/lgfx/v1/platforms/esp32/common.cpp: In function 'cpp::bitwizeshift::result<void, lgfx::v1::error_t> lgfx::v1::i2c::release(int)':
.pio/libdeps/stable/LovyanGFX/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/stable/LovyanGFX/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/stable/LovyanGFX/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/stable/LovyanGFX/src/lgfx/v1/platforms/esp32/common.cpp: In function 'cpp::bitwizeshift::result<void, lgfx::v1::error_t> lgfx::v1::i2c::init(int)':
.pio/libdeps/stable/LovyanGFX/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
*** [.pio/build/stable/lib842/LovyanGFX/lgfx/v1/platforms/esp32/common.cpp.o] Error 1

`

Steps to reproduce ( 再現のための前提条件 )

  1. Create new platformio project
  2. Select these settings

platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.07/platform-espressif32.zip board = esp32-c6-devkitc-1

  1. try to build a library example (I tested M5GFX, with same issue)

あなたの問題を再現できる完全なソースコードを提示してください。

(Any code, will create this issue so I am not attaching mine here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant