From 40290df3bfbb9777268e85a1279a4269adea9fb5 Mon Sep 17 00:00:00 2001 From: C47D Date: Wed, 2 Sep 2020 00:38:04 -0500 Subject: [PATCH 1/2] Update README with instructions for platformio --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/README.md b/README.md index 47545806..0af1d80e 100644 --- a/README.md +++ b/README.md @@ -243,3 +243,38 @@ There are several development boards based on the ESP32 chip, make sure you assi For development kits that come with a display already attached, all the correct settings are already known and can be selected in `menuconfig` from the first option "Select predefined display configuration." Once selected all the other options will be defaulted and won't appear in the menu. +## Platformio support + +Using the [lv_platformio](https://github.com/lvgl/lv_platformio) project add the following lines to `platformio.ini` file: + +``` +[env:esp32] +platform = espressif32 +framework = espidf +board = esp-wrover-kit +``` + +Change the default environment to `default_envs = esp32`. + +Modify the `main.c` like this: + +```c +#include "lvgl.h" + +// #include "driver.h" + +#include "demo.h" + +int app_main(void) +{ + lv_init(); + // hw_init(); + + demo_create(); + + // hw_loop(); + + return 0; +``` + +For more information see: [platformio with espidf framework compability](https://github.com/lvgl/lv_port_esp32/issues/168). From 9d6974e9ac5af672db788697700c17e8574125d5 Mon Sep 17 00:00:00 2001 From: C47D Date: Wed, 2 Sep 2020 08:25:47 -0500 Subject: [PATCH 2/2] README: Add more descriptive comments on platformio main example. --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0af1d80e..5e89fe87 100644 --- a/README.md +++ b/README.md @@ -268,11 +268,17 @@ Modify the `main.c` like this: int app_main(void) { lv_init(); - // hw_init(); + + /* Initialize your hardware. */ + + /* hw_init(); */ demo_create(); - // hw_loop(); + /* Create the UI or start a task for it. + * In the end, don't forget to call `lv_task_handler` in a loop. */ + + /* hw_loop(); */ return 0; ```