Skip to content

Commit

Permalink
made the buffer itself private
Browse files Browse the repository at this point in the history
  • Loading branch information
CamelCaseName committed Nov 16, 2023
1 parent e1169be commit e1e96e2
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/HUB75nano.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit e1e96e2

Please sign in to comment.