abstracting display, touch and sd

This commit is contained in:
Adolfo Reyna
2026-01-28 20:12:41 -05:00
parent 57426c6e7d
commit adfbef7228
396 changed files with 101836 additions and 272 deletions

View File

@@ -0,0 +1,54 @@
#include "low_level_display_st7789.h"
#include <stdio.h>
// Note: This is a placeholder implementation
// You'll need to add the actual ST7789 driver code to lib/st7789/
LowLevelDisplayST7789::LowLevelDisplayST7789(const st7789_config* cfg, int w, int h)
: config(cfg), width(w), height(h), initialized(false) {
}
LowLevelDisplayST7789::~LowLevelDisplayST7789() {
// Cleanup if needed
}
bool LowLevelDisplayST7789::init() {
if (initialized) {
return true;
}
// TODO: Implement ST7789 initialization
// st7789_init(config, width, height);
printf("ST7789 display initialized: %dx%d (stub)\n", width, height);
initialized = true;
return false; // Return false until actual driver is implemented
}
void LowLevelDisplayST7789::clear(bool white) {
// TODO: Implement
(void)white;
}
void LowLevelDisplayST7789::draw_pixel(int x, int y, bool white) {
// TODO: Implement
(void)x; (void)y; (void)white;
}
void LowLevelDisplayST7789::draw_buffer(const uint8_t* bit_buffer) {
// TODO: Implement - convert 1-bit to RGB565 and write
(void)bit_buffer;
}
void LowLevelDisplayST7789::refresh() {
// ST7789 updates immediately
}
void LowLevelDisplayST7789::set_backlight(bool on) {
// TODO: Implement
(void)on;
}
void LowLevelDisplayST7789::set_rotation(uint8_t rotation) {
// TODO: Implement
(void)rotation;
}