lvgl_esp32_drivers icon indicating copy to clipboard operation
lvgl_esp32_drivers copied to clipboard

gpio_matrix_out is not defined

Open cjheath opened this issue 1 year ago • 6 comments

https://github.com/lvgl/lvgl_esp32_drivers/blob/26fe6e7703162ac9b0ee82405e858dc37b885d1f/lvgl_tft/esp_lcd_backlight.c#L59-L67

The called function gpio_matrix_out does not seem to exist anywhere in this library, in LVGL, or in any version of ESP-IDF.

What is the intention of this code, and how does anyone manage to build this package without a definition of this function? More importantly, can it be fixed please?

cjheath avatar Mar 21 '23 23:03 cjheath

I am having the same issue, I found some discussion here:

https://github.com/lvgl/lvgl_esp32_drivers/issues/168

https://github.com/lvgl/lvgl_esp32_drivers/pull/171

The fixes I attempted which got the file to compile:

  • replace gpio_pad_select_gpio() with gpio_pin_reset()
  • replace gpio_matrix_out() with esp_rom_gpio_connect_out_signal()
  • add #include "rom/gpio.h" to driver/gpio.h
  • manually find the #define SIG_GPIO_OUT_IDX and put it in the file (file for ESP32-C3)
  • change .bit_num to .duty_resolution in LCD_backlight_timer

The specific driver files also needed changes.

e5h avatar Mar 22 '23 01:03 e5h

That's not going to work for me because neither ESP-IDF v4.4.4 nor the current trunk version contains any reference to esp_rom_gpio_connect_out_signal

What version of ESP-IDF are you using?

cjheath avatar Mar 22 '23 02:03 cjheath

I am using v5.0, there is a reference to it here, the include statement in my first comment worked for me on an esp32-c3

On a side note, it would have been nice if the devs put some warnings about incompatible versions. As it stands right now, this library seems partially incompatible with both v8 of LVGL and v5.0 of the ESP-IDF.

e5h avatar Mar 22 '23 03:03 e5h

Oh, ok, I missed that - I was probably searching for any definition of gpio_matrix_out at the time. I didn't want to jump to v5 yet because I figured that 3rd party support for V4 would be more stable.

I think I'll be able to figure out something that works with v4. It was just not knowing the definition for gpio_matrix_out I didn't know if it might contain any subtleties that are necessary to this function.

cjheath avatar Mar 22 '23 05:03 cjheath

Could anybody share your codes after edited with the new GPIO?

Pi-pythoner avatar Apr 23 '23 16:04 Pi-pythoner

feel free to try this branch out https://github.com/hiruna/lvgl_esp32_drivers/tree/develop/lvgl_8.3.7_idf_5.2

hiruna avatar May 26 '23 12:05 hiruna