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,38 @@
#ifndef LOW_LEVEL_DISPLAY_ST7796_H
#define LOW_LEVEL_DISPLAY_ST7796_H
#include "low_level_display.h"
#include "st7796.h"
class LowLevelDisplayST7796 : public LowLevelDisplay {
private:
const st7796_config* config;
int width;
int height;
bool initialized;
public:
LowLevelDisplayST7796(const st7796_config* cfg, int w, int h);
~LowLevelDisplayST7796() override;
// Core display operations - converts 1-bit to RGB565 internally
bool init() override;
void clear(bool white = true) override;
void draw_pixel(int x, int y, bool white) override;
void draw_buffer(const uint8_t* bit_buffer) override;
void refresh() override;
// Display properties
int get_width() const override { return width; }
int get_height() const override { return height; }
DisplayType get_type() const override { return DISPLAY_TYPE_ST7796; }
bool is_color() const override { return true; }
// Backlight control
void set_backlight(bool on) override;
// Orientation control
void set_rotation(uint8_t rotation) override;
};
#endif // LOW_LEVEL_DISPLAY_ST7796_H