diff options
| author | Christian Krinitsin <mail@krinitsin.com> | 2025-03-26 20:47:12 +0100 |
|---|---|---|
| committer | Christian Krinitsin <mail@krinitsin.com> | 2025-03-26 20:47:12 +0100 |
| commit | 32a24182ad8cd2fc3a9125cb8f70de3b9c22f9a4 (patch) | |
| tree | f2d3a9a1696d50ae28e88e9ba94684bf5ffee5d3 /firmware/include/ui/ui.h | |
| parent | 6b3fb653f8b342d8ecfc093a000e9f6fa479c644 (diff) | |
| download | tetris-console-32a24182ad8cd2fc3a9125cb8f70de3b9c22f9a4.tar.gz tetris-console-32a24182ad8cd2fc3a9125cb8f70de3b9c22f9a4.zip | |
add preliminary public apis
Diffstat (limited to 'firmware/include/ui/ui.h')
| -rw-r--r-- | firmware/include/ui/ui.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/firmware/include/ui/ui.h b/firmware/include/ui/ui.h new file mode 100644 index 0000000..44b4555 --- /dev/null +++ b/firmware/include/ui/ui.h @@ -0,0 +1,22 @@ +#pragma once + +#include <Adafruit_ST7735.h> +#include <stdint.h> + +#include "game/game_state.h" + +namespace ui { + +class UI { +public: + UI(int8_t tft_cs, int8_t tft_rst, int8_t tft_dc); + + void init(); + + void render_screen(const game::GameState& state); + +private: + Adafruit_ST7735 tft; +}; + +} |