Hal refactored (#99)

This commit is contained in:
Ken Van Hoeylandt
2024-12-02 00:32:39 +01:00
committed by GitHub
parent 0188ce721c
commit 33bb742dfb
103 changed files with 1222 additions and 1228 deletions
+2 -17
View File
@@ -5,8 +5,8 @@
#define TAG "cores3_lvgl"
_Nullable lv_disp_t* m5stack_lvgl_display(bool usePsram);
_Nullable lv_indev_t* m5stack_lvgl_touch();
_Nullable lv_disp_t* createDisplay(bool usePsram);
_Nullable lv_indev_t* createTouch();
bool m5stack_lvgl_init() {
static lv_display_t* display = nullptr;
@@ -24,21 +24,6 @@ bool m5stack_lvgl_init() {
return false;
}
// Add display
display = m5stack_lvgl_display(true);
if (display == nullptr) {
TT_LOG_E(TAG, "failed to add display");
return false;
}
// Add touch
lv_indev_t* touch_indev = m5stack_lvgl_touch();
if (touch_indev == nullptr) {
TT_LOG_E(TAG, "failed to add touch");
return false;
}
lv_indev_set_display(touch_indev, display);
// Set syncing functions
tt::lvgl::syncSet(&lvgl_port_lock, &lvgl_port_unlock);