From e1e96e224f7dd871854a16969b44e4c760ec4f67 Mon Sep 17 00:00:00 2001 From: Leonhard Seidel Date: Thu, 16 Nov 2023 14:42:40 +0100 Subject: [PATCH] made the buffer itself private --- src/HUB75nano.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/HUB75nano.h b/src/HUB75nano.h index 1fada7c..9fde5fc 100644 --- a/src/HUB75nano.h +++ b/src/HUB75nano.h @@ -1160,18 +1160,6 @@ class Panel // - line with given width #pragma endregion // drawing -#pragma region buffer_definition -#ifndef PANEL_NO_BUFFER -#ifdef PANEL_BIG - LED buffer[PANEL_BUFFERSIZE]; // uses 768 bytes on max size display with 1 bit, 1536 bytes with 2 bits of depth -#else -#ifdef PANEL_FLASH - PGM_VOID_P buffer = 0; -#else - LED buffer[PANEL_BUFFERSIZE]; -#endif -#endif - #pragma region buffer_output_definitions: #ifdef PANEL_MAX_SPEED @@ -1192,10 +1180,6 @@ class Panel #endif } #pragma endregion // buffer_output_definitions -#else - LED buffer[0]; -#endif -#pragma endregion // buffer_definition #ifdef PANEL_MAX_SPEED __attribute__((always_inline)) inline void setBuffer(uint8_t x, uint8_t y, Color color) @@ -1216,6 +1200,22 @@ class Panel private: uint8_t row = 0; +#pragma region buffer_definition +#ifndef PANEL_NO_BUFFER +#ifdef PANEL_BIG + LED buffer[PANEL_BUFFERSIZE]; // uses 768 bytes on max size display with 1 bit, 1536 bytes with 2 bits of depth +#else +#ifdef PANEL_FLASH + PGM_VOID_P buffer = 0; +#else + LED buffer[PANEL_BUFFERSIZE]; +#endif +#endif +#else + LED buffer[0]; +#endif +#pragma endregion // buffer_definition + #pragma region buffer_setting_definitions: #ifdef PANEL_MAX_SPEED