From b0e4a9600f3f3c86140c62c1e4cdfb4bedb27f4f Mon Sep 17 00:00:00 2001 From: Scott Allen Date: Sat, 16 Aug 2014 21:56:47 -0400 Subject: [PATCH 1/3] 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); From 72fdeeb77bc301162d330509508aca974dee4898 Mon Sep 17 00:00:00 2001 From: Scott Allen Date: Tue, 19 Aug 2014 10:57:31 -0400 Subject: [PATCH 2/3] Added screenBuffer keyword --- keywords.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/keywords.txt b/keywords.txt index c07bf85..5fcc5fd 100644 --- a/keywords.txt +++ b/keywords.txt @@ -63,6 +63,7 @@ setValue KEYWORD2 draw KEYWORD2 reDraw KEYWORD2 drawFace KEYWORD2 +screenBuffer KEYWORD2 checkComm KEYWORD2 ####################################### From ba0b7797403571357c1a9d4b9317d16280730053 Mon Sep 17 00:00:00 2001 From: Scott Allen Date: Wed, 20 Aug 2014 06:24:57 -0400 Subject: [PATCH 3/3] Changed name from screenBuffer to getScreenBuffer --- MicroView.cpp | 16 ++++++++-------- MicroView.h | 2 +- keywords.txt | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/MicroView.cpp b/MicroView.cpp index dacc511..21bb840 100644 --- a/MicroView.cpp +++ b/MicroView.cpp @@ -891,6 +891,14 @@ void MicroView::flipHorizontal(boolean flip) { } } +/** \brief Get pointer to screen buffer + + Return a pointer to the start of the RAM screen buffer for direct access. +*/ +uint8_t *MicroView::getScreenBuffer(void) { + return screenmemory; +} + /** \brief Parse command. Command stored in serCmd array will be parsed to performed draw functions. @@ -1327,14 +1335,6 @@ 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 804714f..b9c78ee 100644 --- a/MicroView.h +++ b/MicroView.h @@ -192,7 +192,7 @@ public: uint8_t getLCDHeight(void); void setColor(uint8_t color); void setDrawMode(uint8_t mode); - uint8_t *screenBuffer(void); + uint8_t *getScreenBuffer(void); // Font functions uint8_t getFontWidth(void); diff --git a/keywords.txt b/keywords.txt index 5fcc5fd..63680b3 100644 --- a/keywords.txt +++ b/keywords.txt @@ -63,7 +63,7 @@ setValue KEYWORD2 draw KEYWORD2 reDraw KEYWORD2 drawFace KEYWORD2 -screenBuffer KEYWORD2 +getScreenBuffer KEYWORD2 checkComm KEYWORD2 #######################################