Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

wrong type in include file (esp-idf-5.3beta2) (IDFGH-13083) #14029

Closed
3 tasks done
dannybackx opened this issue Jun 20, 2024 · 1 comment
Closed
3 tasks done

wrong type in include file (esp-idf-5.3beta2) (IDFGH-13083) #14029

dannybackx opened this issue Jun 20, 2024 · 1 comment
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.

5.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?

See esp-idf-v5.3-beta2/components/esp_lcd/include/esp_lcd_panel_dev.h - the three fields in the union should have different types.

typedef struct {
    int reset_gpio_num; /*!< GPIO used to reset the LCD panel, set to -1 if it's not used */
    union {
        lcd_rgb_element_order_t color_space;   /*!< @deprecated Set RGB color space, please use rgb_ele_order instead */
        lcd_rgb_element_order_t rgb_endian;    /*!< @deprecated Set RGB data endian, please use rgb_ele_order instead */
        lcd_rgb_element_order_t rgb_ele_order; /*!< Set RGB element order, RGB or BGR */
    };

What is the actual behavior?

/home/danny/src/esp-idf/ZX3D95CD01S/gc9503.3/main/App.cpp:39:38: error: cannot convert 'esp_lcd_color_space_t' to 'lcd_rgb_element_order_t' in initialization
   39 | #define EXAMPLE_LCD_COLOR_SPACE     (ESP_LCD_COLOR_SPACE_BGR)
      |                                     ~^~~~~~~~~~~~~~~~~~~~~~~~
      |                                      |
      |                                      esp_lcd_color_space_t
/home/danny/src/esp-idf/ZX3D95CD01S/gc9503.3/main/App.cpp:114:24: note: in expansion of macro 'EXAMPLE_LCD_COLOR_SPACE'
  114 |         .color_space = EXAMPLE_LCD_COLOR_SPACE,

Steps to reproduce.

Compile this

#define EXAMPLE_LCD_COLOR_SPACE     (ESP_LCD_COLOR_SPACE_BGR)
    const esp_lcd_panel_dev_config_t panel_config = {
        .reset_gpio_num = EXAMPLE_LCD_GPIO_RST,
        .color_space = EXAMPLE_LCD_COLOR_SPACE,
        .bits_per_pixel = EXAMPLE_LCD_BITS_PER_PIXEL,
    };

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 wrong type in include file (esp-idf-5.3beta2) wrong type in include file (esp-idf-5.3beta2) (IDFGH-13083) Jun 20, 2024
@suda-morris
Copy link
Collaborator

Thanks @dannybackx I can reproduce the build issue in a cpp project. I think the quickest workaround is to not use the color_space, it's deprecated. Please try rgb_ele_order

const esp_lcd_panel_dev_config_t panel_config = {
    .reset_gpio_num = 0,
    .rgb_ele_order = LCD_RGB_ELEMENT_ORDER_BGR,
    .data_endian = LCD_RGB_DATA_ENDIAN_LITTLE,
    .bits_per_pixel = 16,
    .flags = {
        .reset_active_high = false,
    },
    .vendor_config = NULL,
};

@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 20, 2024
# for free to join this conversation on GitHub. Already have an account? # 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