How to use lcd panel drivers from esp-idf/components/esp_lcd?
How to use lcd panel drivers from esp-idf/components/esp_lcd?
I have a dev board with a st7789 panel and I want to use the panel driver located in esp-idf/components/esp_lcd/src/esp_lcd_panel_st7789.c, but I can't find any headers to include. Am I supposed to include the whole .c-file in my own .c-file? It comes with the function definitions on top after all.
-
- Posts: 364
- Joined: Mon Jan 04, 2021 2:06 pm
Re: How to use lcd panel drivers from esp-idf/components/esp_lcd?
Hi,
You can use this example to see how to include the component.
You can use this example to see how to include the component.
Code: Select all
idf_component_register(
SRC_DIRS
"src/boards"
"src/peripherals"
"src/storage"
"src/indev"
"src/codec"
INCLUDE_DIRS
"src/boards"
"src"
"include"
REQUIRES
esp_hid
esp_lcd
fatfs
bus
i2c_devices
spiffs)
Re: How to use lcd panel drivers from esp-idf/components/esp_lcd?
I'm working with the tjpgd example with esp-idf 5.0 and I can't see that it uses esp-lcd as a component in any cmakelist-file, it includes the headers directly. I'm looking at https://docs.espressif.com/projects/esp ... quirements and esp_lcd is not one of the common components so I don't understand why it is possible to use esp_lcd without requiring it as a component? It's the same with /examples/peripherals/adc/continuous_read which got updated for 5.0, I can't see that it requires esp_adc component, it just includes the header "esp_adc/adc_continuous.h". Can the built in esp-idf components in esp-idf/components/ be used directly without requiring them in the cmakelist-file?
To solve the original issue I just used the generic panel functions included in "esp_lcd_panel_ops.h" which I think is what is supposed to be used instead of the panel specific ones. I had to set a gap with to move the picture to the correct place on the display because it doesn't start drawing at 0,0.
To solve the original issue I just used the generic panel functions included in "esp_lcd_panel_ops.h" which I think is what is supposed to be used instead of the panel specific ones. I had to set a gap with
Code: Select all
esp_lcd_panel_set_gap()
Who is online
Users browsing this forum: Bing [Bot], cdollar, Majestic-12 [Bot] and 129 guests