1
0
forked from me/IronOS

Add secondary framebuffer, instead of allocating on stack

This commit is contained in:
Patrick Horlebein
2020-04-25 11:43:14 +02:00
parent b8c822696b
commit d69293342d
3 changed files with 24 additions and 16 deletions

View File

@@ -101,10 +101,11 @@ public:
bool clear);
static void drawHeatSymbol(uint8_t state);
static void drawScrollIndicator(uint8_t p, uint8_t h); // Draws a scrolling position indicator
static void transitionToContents(uint8_t *framebuffer, bool forwardNavigation);
static void set_framebuffer(uint8_t *buffer);
static void transitionSecondaryFramebuffer(bool forwardNavigation);
static void useSecondaryFramebuffer(bool useSecondary);
private:
static void drawChar(char c); // Draw a character to a specific location
static void setFramebuffer(uint8_t *buffer);
static const uint8_t* currentFont;// Pointer to the current font used for rendering to the buffer
static uint8_t* firstStripPtr; // Pointers to the strips to allow for buffer having extra content
static uint8_t* secondStripPtr; //Pointers to the strips
@@ -114,6 +115,7 @@ private:
static int16_t cursor_x, cursor_y;
static uint8_t displayOffset;
static uint8_t screenBuffer[16 + (OLED_WIDTH * 2) + 10]; // The data buffer
static uint8_t secondFrameBuffer[OLED_WIDTH * 2];
};
#endif /* OLED_HPP_ */