Skip to content

Commit 3087e40

Browse files
committed
added frontBuffer method, like backBuffer
1 parent 90ac761 commit 3087e40

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

RGBmatrixPanel.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,11 @@ void RGBmatrixPanel::fillScreen(uint16_t c) {
349349
}
350350
}
351351

352+
// Return address of front buffer -- can then read display directly
353+
uint8_t *RGBmatrixPanel::frontBuffer() {
354+
return matrixbuff[1-backindex];
355+
}
356+
352357
// Return address of back buffer -- can then load/store data directly
353358
uint8_t *RGBmatrixPanel::backBuffer() {
354359
return matrixbuff[backindex];

RGBmatrixPanel.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class RGBmatrixPanel : public Adafruit_GFX {
2626
swapBuffers(boolean),
2727
dumpMatrix(void);
2828
uint8_t
29+
*frontBuffer(void),
2930
*backBuffer(void);
3031
uint16_t
3132
Color333(uint8_t r, uint8_t g, uint8_t b),

0 commit comments

Comments
 (0)