lvgl / lvgl_esp32_drivers

Drivers for ESP32 to be used with LVGL
MIT License
330 stars 281 forks source link

fix missing SPI_HOST_MAX #188

Closed seregamorph closed 5 months ago

seregamorph commented 2 years ago

Fix compilation issue

                 from components/lvgl_esp32_drivers/lvgl_helpers.h:18,
                 from components/lvgl_esp32_drivers/lvgl_helpers.c:10:
components/lvgl_esp32_drivers/lvgl_helpers.c: In function 'lvgl_spi_driver_init':
components/lvgl_esp32_drivers/lvgl_helpers.c:157:28: error: 'SPI_HOST_MAX' undeclared (first use in this function); did you mean 'GPIO_PORT_MAX'?
     assert((0 <= host) && (SPI_HOST_MAX > host));
                            ^~~~~~~~~~~~
components/lvgl_esp32_drivers/lvgl_helpers.c:157:28: note: each undeclared identifier is reported only once for each function it appears in
*** [.pio/build/esp32doit-devkit-v1-sergey/components/lvgl_esp32_drivers/lvgl_helpers.o] Error 1

Fix taken from develop branch: https://github.com/lvgl/lvgl_esp32_drivers/blob/develop/lvgl_helpers.c#L270 by @C47D

C47D commented 2 years ago

@tore-espressif should we merge this or close it as develop is soon to be merged into master?