From c19dcac092c594598e1ef3ab745189adf84b32d0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 15 Oct 2021 15:10:41 +0200 Subject: add framebuffer and pervasive aurora mb test app --- include/object/framebuffer.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 include/object/framebuffer.h (limited to 'include/object') diff --git a/include/object/framebuffer.h b/include/object/framebuffer.h new file mode 100644 index 0000000..6eac7e0 --- /dev/null +++ b/include/object/framebuffer.h @@ -0,0 +1,21 @@ +#pragma once + +class Framebuffer +{ + public: + unsigned char *data; + + Framebuffer(unsigned char *data) : data(data) {} + + constexpr static unsigned int const width = CONFIG_framebuffer_width; + constexpr static unsigned int const height = CONFIG_framebuffer_height; + + void clear(); + void fillBox(unsigned int x, unsigned int y, unsigned int w, unsigned int h); + void drawAt(unsigned int x, unsigned int y, unsigned int w, unsigned int h, unsigned char *image); + + private: + Framebuffer(Framebuffer& copy); +}; + +extern Framebuffer fb; -- cgit v1.2.3