mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-03-30 17:05:52 +00:00
* companion radio: now with optional UITask (enabled by DISPLAY_CLASS config in target/env)
28 lines
768 B
C++
28 lines
768 B
C++
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
class DisplayDriver {
|
|
int _w, _h;
|
|
protected:
|
|
DisplayDriver(int w, int h) { _w = w; _h = h; }
|
|
public:
|
|
enum Color { DARK, LIGHT };
|
|
|
|
int width() const { return _w; }
|
|
int height() const { return _h; }
|
|
|
|
virtual bool isOn() = 0;
|
|
virtual void turnOn() = 0;
|
|
virtual void turnOff() = 0;
|
|
virtual void startFrame(Color bkg = DARK) = 0;
|
|
virtual void setTextSize(int sz) = 0;
|
|
virtual void setColor(Color c) = 0;
|
|
virtual void setCursor(int x, int y) = 0;
|
|
virtual void print(const char* str) = 0;
|
|
virtual void fillRect(int x, int y, int w, int h) = 0;
|
|
virtual void drawRect(int x, int y, int w, int h) = 0;
|
|
virtual void drawXbm(int x, int y, const uint8_t* bits, int w, int h) = 0;
|
|
virtual void endFrame() = 0;
|
|
};
|