summary refs log tree commit diff stats
path: root/firmware/src/ui/ui.cpp
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-03-26 20:47:12 +0100
committerChristian Krinitsin <mail@krinitsin.com>2025-03-26 20:47:12 +0100
commit32a24182ad8cd2fc3a9125cb8f70de3b9c22f9a4 (patch)
treef2d3a9a1696d50ae28e88e9ba94684bf5ffee5d3 /firmware/src/ui/ui.cpp
parent6b3fb653f8b342d8ecfc093a000e9f6fa479c644 (diff)
downloadtetris-console-32a24182ad8cd2fc3a9125cb8f70de3b9c22f9a4.tar.gz
tetris-console-32a24182ad8cd2fc3a9125cb8f70de3b9c22f9a4.zip
add preliminary public apis
Diffstat (limited to 'firmware/src/ui/ui.cpp')
-rw-r--r--firmware/src/ui/ui.cpp21
1 files changed, 21 insertions, 0 deletions
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
+}
+
+}