OreBolt-OS/modules/orebolt-emulate/emulator.c

38 lines
975 B
C

/*
* emulator.c -- OreBolt OS v1.4 module: emulate
*
* SPDX-License-Identifier: GPL-2.0-or-later
*
* USB emulator (HID + mass storage + ACM).
*
* v1.4 stub: full module surface (init/deinit) so the build links cleanly
* against liblvgl.so. Real implementation is restored from the
* upstream source set tracked in SHA256SUMS.
*/
#include "h2_ui.h"
#include "log_manager.h"
static lv_obj_t *emulator_screen = NULL;
void emulator_init(lv_obj_t *parent)
{
emulator_screen = lv_obj_create(parent);
lv_obj_set_size(emulator_screen, H2_LCD_WIDTH - 4, H2_LCD_HEIGHT - 4);
lv_obj_center(emulator_screen);
lv_obj_t *lbl = lv_label_create(emulator_screen);
lv_label_set_text(lbl, "emulator\nv1.4 (stub)");
lv_obj_center(lbl);
LOG_INF("emulator init");
}
void emulator_deinit(void)
{
if (emulator_screen) {
lv_obj_del(emulator_screen);
emulator_screen = NULL;
}
LOG_INF("emulator deinit");
}