mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 10:53:17 +00:00
35 lines
624 B
C++
35 lines
624 B
C++
#include "Hal/Configuration.h"
|
|
#include "lvgl_task.h"
|
|
#include "src/lv_init.h"
|
|
|
|
#define TAG "hardware"
|
|
|
|
extern const tt::hal::Power power;
|
|
|
|
static bool lvgl_init() {
|
|
lv_init();
|
|
lvgl_task_start();
|
|
return true;
|
|
}
|
|
|
|
TT_UNUSED static void lvgl_deinit() {
|
|
lvgl_task_interrupt();
|
|
while (lvgl_task_is_running()) {
|
|
tt::delay_ms(10);
|
|
}
|
|
|
|
#if LV_ENABLE_GC || !LV_MEM_CUSTOM
|
|
lv_deinit();
|
|
#endif
|
|
}
|
|
|
|
extern const tt::hal::Configuration sim_hardware = {
|
|
.initLvgl = &lvgl_init,
|
|
.display = {
|
|
.setBacklightDuty = nullptr,
|
|
},
|
|
.sdcard = nullptr,
|
|
.power = &power,
|
|
.i2c = {}
|
|
};
|