Closed
Description
Environment ( 実行環境 )
- MCU or Board name: ESP32-S3
- Panel Driver IC: ILI9488
- Bus type: Parallel
- LovyanGFX version: 1.1.8 (commit ID: 19a2e71)
- Build Environment : VSCode ESP-IDF
- Operating System: Windows 11 Pro
Hello. I'm reporting because I think I found a bug.
I think this may be related to the fix published about the ESP-IDF error mentioned here. It might cause a new bug. #423
I'm using ESP32-S3 and I wrote the code with ESP-IDF v5.0.2.
Symptom
The error codes are as follows.
./components/LovyanGFX/src/lgfx/v1/platforms/esp32/common.cpp: In function 'void lgfx::v1::i2c::i2c_set_cmd(i2c_dev_t*, uint8_t, uint8_t, uint8_t, bool)':
./components/LovyanGFX/src/lgfx/v1/platforms/esp32/common.cpp:808:14: error: 'struct i2c_dev_t' has no member named 'comd'; did you mean 'comd0'?
808 | (&dev->comd[0])[index].val = cmd_val;
| ^~~~
| comd0
My fix
When I change the line of code from (&dev->comd[0])
to (&dev->comd0)
, the build errors disappear.
Before:
// common.cpp:806
#if defined (CONFIG_IDF_TARGET_ESP32S3)
#if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 2) && ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 1, 0))
(&dev->comd[0])[index].val = cmd_val;
#else
(&dev->comd0)[index].val = cmd_val;
#endif
#else
After:
// common.cpp:806
#if defined (CONFIG_IDF_TARGET_ESP32S3)
#if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 2) && ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 1, 0))
(&dev->comd0)[index].val = cmd_val;
#else
(&dev->comd0)[index].val = cmd_val;
#endif
#else
Metadata
Assignees
Labels
No labels