espressif / idf-extra-components

Additional components for ESP-IDF, maintained by Espressif
147 stars 89 forks source link

usb: fix gcc-12 compile errors #137

Closed Lapshin closed 1 year ago

Lapshin commented 1 year ago

Checklist

Change description

Fix for gcc-12 builds

The compile errors were:

In file included from ../main/cdc_acm_vcp_example_main.cpp:16:
../managed_components/espressif__usb_host_ch34x_vcp/include/usb/vcp_ch34x.hpp:56:46: error: 'constexpr const std::array<short unsigned int, 3> esp_usb::CH34x::pids' has incomplete type
   56 |     static constexpr std::array<uint16_t, 3> pids = {CH340_PID, CH340_PID_1, CH341_PID};
      |                                              ^~~~
In file included from ../main/cdc_acm_vcp_example_main.cpp:17:
../managed_components/espressif__usb_host_cp210x_vcp/include/usb/vcp_cp210x.hpp:108:46: error: 'constexpr const std::array<short unsigned int, 3> esp_usb::CP210x::pids' has incomplete type
  108 |     static constexpr std::array<uint16_t, 3> pids = {CP210X_PID, CP2105_PID, CP2108_PID};
      |                                              ^~~~
In file included from ../main/cdc_acm_vcp_example_main.cpp:18:
../managed_components/espressif__usb_host_ftdi_vcp/include/usb/vcp_ftdi.hpp:61:46: error: 'constexpr const std::array<short unsigned int, 2> esp_usb::FT23x::pids' has incomplete type
   61 |     static constexpr std::array<uint16_t, 2> pids = {FT232_PID, FT231_PID};
      |                                              ^~~~