Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add examples using ESP32 peripherals #52

Open
C47D opened this issue Feb 20, 2020 · 4 comments
Open

Add examples using ESP32 peripherals #52

C47D opened this issue Feb 20, 2020 · 4 comments
Labels
pinned Doesn't get closed automatically

Comments

@C47D
Copy link
Collaborator

C47D commented Feb 20, 2020

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?

@jeremyjh
Copy link
Contributor

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

@stale
Copy link

stale bot commented Mar 13, 2020

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 stale bot added the stale This will not be worked on label Mar 13, 2020
@C47D
Copy link
Collaborator Author

C47D commented Mar 13, 2020

go away

@stale stale bot removed the stale This will not be worked on label Mar 13, 2020
@kisvegabor kisvegabor added the pinned Doesn't get closed automatically label Mar 13, 2020
@kisvegabor
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pinned Doesn't get closed automatically
Projects
None yet
Development

No branches or pull requests

3 participants