C++ conversion (#80)

Converted project to C++
This commit is contained in:
Ken Van Hoeylandt
2024-11-22 20:26:08 +01:00
committed by GitHub
parent 6d80144e12
commit 85e26636a3
488 changed files with 6017 additions and 39466 deletions
+34
View File
@@ -0,0 +1,34 @@
#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 = {
.bootstrap = nullptr,
.init_graphics = &lvgl_init,
.display = {
.set_backlight_duty = nullptr,
},
.sdcard = nullptr,
.power = &power
};