Simplify LVGL init: move code into Tactility (#208)
The esp_lvgl_port code was duplicated across all boards, so I moved it into the Tactility subproject to simplify the board implementations.
This commit is contained in:
committed by
GitHub
parent
c1f55429b6
commit
8ccba15c25
@@ -7,6 +7,10 @@
|
||||
#include <Tactility/hal/Touch.h>
|
||||
#include <Tactility/kernel/SystemEvents.h>
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
#include "Tactility/lvgl/EspLvglPort.h"
|
||||
#endif
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
namespace tt::lvgl {
|
||||
@@ -82,10 +86,11 @@ void init(const hal::Configuration& config) {
|
||||
|
||||
kernel::systemEventPublish(kernel::SystemEvent::BootInitLvglBegin);
|
||||
|
||||
if (config.initLvgl != nullptr && !config.initLvgl()) {
|
||||
TT_LOG_E(TAG, "LVGL init failed");
|
||||
#ifdef ESP_PLATFORM
|
||||
if (config.lvglInit == hal::LvglInit::Default && !initEspLvglPort()) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
auto display = initDisplay(config);
|
||||
if (display == nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user