lv_port_esp32 icon indicating copy to clipboard operation
lv_port_esp32 copied to clipboard

Add examples using ESP32 peripherals

Open C47D opened this issue 5 years ago • 4 comments
trafficstars

As #39 explains there are certain consideratio´n when using some ESP32 peripherals, how can we add examples using some peripherals? Maybe having the lvgl and other example projects and choosing one at configuration time?

Do you know if this is possible @jeremyjh?

C47D avatar Feb 20 '20 14:02 C47D

There is more than one way to do it, but yeah one possibility would be to have a separate main for each example that are not added to the build files. Instead the project has a single main.c that includes the correct main file for the chose example based on those CONFIG defines, e.g.

#ifdef CONFIG_LVGL_EXAMPLE_WIFI 
#include "examples/wifi_main.c"
#endif

You don't want this configuration prompt in the library because the library doesn't use the examples, but you can have a Kconfig file in the main folder. I did that in the loboris driver fork for the settings that apply only to the example vs the library: https://github.com/jeremyjh/ESP32_TFT_library/blob/master/main/Kconfig.projbuild

jeremyjh avatar Feb 21 '20 14:02 jeremyjh

This issue or pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 13 '20 14:03 stale[bot]

go away

C47D avatar Mar 13 '20 15:03 C47D

I've added the pinned label to not mark it as stale.

kisvegabor avatar Mar 13 '20 16:03 kisvegabor