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

esp_lcd_new_panel_io_i2c not C++ safe or so ? (5.3beta2) (IDFGH-13090) #14037

Closed
3 tasks done
dannybackx opened this issue Jun 20, 2024 · 1 comment
Closed
3 tasks done
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@dannybackx
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

esp-idf v5.3beta2

Operating System used.

Linux

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

What is the expected behavior?

compile

    const esp_lcd_panel_io_i2c_config_t tp_io_config = ESP_LCD_TOUCH_IO_I2C_FT5x06_CONFIG();
    ESP_RETURN_ON_ERROR(esp_lcd_new_panel_io_i2c((esp_lcd_i2c_bus_handle_t)EXAMPLE_TOUCH_I2C_NUM, &tp_io_config, &tp_io_handle), TAG, "");

What is the actual behavior?

In file included from /home/danny/src/esp-idf/ZX3D95CD01S/gc9503.3/main/App.cpp:16:
/home/danny/src/github/esp32/esp-idf-v5.3-beta2/components/esp_lcd/include/esp_lcd_panel_io.h:227:37: error: found ':' in nested-name-specifier, expected '::'
  227 |             i2c_master_bus_handle_t : esp_lcd_new_panel_io_i2c_v2, \
      |                                     ^
/home/danny/src/github/esp32/esp-idf-v5.3-beta2/components/esp_common/include/esp_check.h:166:30: note: in definition of macro 'ESP_RETURN_ON_ERROR'
  166 |         esp_err_t err_rc_ = (x);                                                                           \
      |                              ^
/home/danny/src/esp-idf/ZX3D95CD01S/gc9503.3/main/App.cpp:177:25: note: in expansion of macro 'esp_lcd_new_panel_io_i2c'
  177 |     ESP_RETURN_ON_ERROR(esp_lcd_new_panel_io_i2c((esp_lcd_i2c_bus_handle_t)EXAMPLE_TOUCH_I2C_NUM, &tp_io_config, &tp_io_handle), TAG, "");
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~
/home/danny/src/github/esp32/esp-idf-v5.3-beta2/components/esp_lcd/include/esp_lcd_panel_io.h:227:13: error: 'i2c_master_bus_handle_t' is not a class, namespace, or enumeration
  227 |             i2c_master_bus_handle_t : esp_lcd_new_panel_io_i2c_v2, \
      |             ^~~~~~~~~~~~~~~~~~~~~~~
/home/danny/src/github/esp32/esp-idf-v5.3-beta2/components/esp_common/include/esp_check.h:166:30: note: in definition of macro 'ESP_RETURN_ON_ERROR'
  166 |         esp_err_t err_rc_ = (x);                                                                           \
      |                              ^
/home/danny/src/esp-idf/ZX3D95CD01S/gc9503.3/main/App.cpp:177:25: note: in expansion of macro 'esp_lcd_new_panel_io_i2c'
  177 |     ESP_RETURN_ON_ERROR(esp_lcd_new_panel_io_i2c((esp_lcd_i2c_bus_handle_t)EXAMPLE_TOUCH_I2C_NUM, &tp_io_config, &tp_io_handle), TAG, "");
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~
/home/danny/src/github/esp32/esp-idf-v5.3-beta2/components/esp_lcd/include/esp_lcd_panel_io.h:228:13: error: expected primary-expression before 'default'
  228 |             default : esp_lcd_new_panel_io_i2c_v1) (bus, io_config, ret_io) \
      |             ^~~~~~~
/home/danny/src/github/esp32/esp-idf-v5.3-beta2/components/esp_common/include/esp_check.h:166:30: note: in definition of macro 'ESP_RETURN_ON_ERROR'
  166 |         esp_err_t err_rc_ = (x);                                                                           \
      |                              ^
/home/danny/src/esp-idf/ZX3D95CD01S/gc9503.3/main/App.cpp:177:25: note: in expansion of macro 'esp_lcd_new_panel_io_i2c'
  177 |     ESP_RETURN_ON_ERROR(esp_lcd_new_panel_io_i2c((esp_lcd_i2c_bus_handle_t)EXAMPLE_TOUCH_I2C_NUM, &tp_io_config, &tp_io_handle), TAG, "");
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~
/home/danny/src/github/esp32/esp-idf-v5.3-beta2/components/esp_lcd/include/esp_lcd_panel_io.h:226:58: error: '_Generic' was not declared in this scope
  226 | #define esp_lcd_new_panel_io_i2c(bus, io_config, ret_io) _Generic((bus),  \
      |                                                          ^~~~~~~~
/home/danny/src/github/esp32/esp-idf-v5.3-beta2/components/esp_common/include/esp_check.h:166:30: note: in definition of macro 'ESP_RETURN_ON_ERROR'
  166 |         esp_err_t err_rc_ = (x);                                                                           \
      |                              ^
/home/danny/src/esp-idf/ZX3D95CD01S/gc9503.3/main/App.cpp:177:25: note: in expansion of macro 'esp_lcd_new_panel_io_i2c'
  177 |     ESP_RETURN_ON_ERROR(esp_lcd_new_panel_io_i2c((esp_lcd_i2c_bus_handle_t)EXAMPLE_TOUCH_I2C_NUM, &tp_io_config, &tp_io_handle), TAG, "");
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~

Steps to reproduce.

Try to compile esp_lcd/include/esp_lcd_panel_io.h with g++

Build or installation Logs.

No response

More Information.

No response

@dannybackx dannybackx added the Type: Bug bugs in IDF label Jun 20, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label Jun 20, 2024
@github-actions github-actions bot changed the title esp_lcd_new_panel_io_i2c not C++ safe or so ? (5.3beta2) esp_lcd_new_panel_io_i2c not C++ safe or so ? (5.3beta2) (IDFGH-13090) Jun 20, 2024
@suda-morris
Copy link
Collaborator

Great! @dannybackx Thanks for finding another cxx building issue. Fixing is on my way.

@espressif-bot espressif-bot added Status: In Progress Work is in progress Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: Opened Issue is new Status: In Progress Work is in progress labels Jun 21, 2024
espressif-bot pushed a commit that referenced this issue Jun 25, 2024
…_i2c

becuase _Generic is not available in C++

Closes #14037
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

3 participants