From b0e4a9600f3f3c86140c62c1e4cdfb4bedb27f4f Mon Sep 17 00:00:00 2001 From: Scott Allen Date: Sat, 16 Aug 2014 21:56:47 -0400 Subject: [PATCH] Add uView.screenBuffer() for access to screen RAM. Returns a pointer to the start of the RAM screen buffer for direct write and read access. --- MicroView.cpp | 8 ++++++++ MicroView.h | 1 + 2 files changed, 9 insertions(+) diff --git a/MicroView.cpp b/MicroView.cpp index eaf7b9a..dacc511 100644 --- a/MicroView.cpp +++ b/MicroView.cpp @@ -1327,6 +1327,14 @@ int MicroView::readSerial(void) return i; } +/** \brief Get pointer to screen buffer + + Return a pointer to the start of the RAM screen buffer for direct access. +*/ +uint8_t *MicroView::screenBuffer(void) { + return screenmemory; +} + // ------------------------------------------------------------------------------------- // MicroViewWidget Class - start // ------------------------------------------------------------------------------------- diff --git a/MicroView.h b/MicroView.h index f994e11..804714f 100644 --- a/MicroView.h +++ b/MicroView.h @@ -192,6 +192,7 @@ public: uint8_t getLCDHeight(void); void setColor(uint8_t color); void setDrawMode(uint8_t mode); + uint8_t *screenBuffer(void); // Font functions uint8_t getFontWidth(void);