From 32a24182ad8cd2fc3a9125cb8f70de3b9c22f9a4 Mon Sep 17 00:00:00 2001 From: Christian Krinitsin Date: Wed, 26 Mar 2025 20:47:12 +0100 Subject: add preliminary public apis --- firmware/src/ui/ui.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 firmware/src/ui/ui.cpp (limited to 'firmware/src/ui/ui.cpp') diff --git a/firmware/src/ui/ui.cpp b/firmware/src/ui/ui.cpp new file mode 100644 index 0000000..af27b37 --- /dev/null +++ b/firmware/src/ui/ui.cpp @@ -0,0 +1,21 @@ +#include "ui/ui.h" +#include "game/game_state.h" + +namespace ui { + +UI::UI(int8_t tft_cs, int8_t tft_rst, int8_t tft_dc) + : tft { tft_cs, tft_rst, tft_dc } +{ +} + +void UI::init() +{ + tft.initR(INITR_BLACKTAB); +} + +void UI::render_screen(const game::GameState& state) +{ + // TODO +} + +} -- cgit 1.4.1