Skip to content

Commit 876a619

Browse files
committed
added render_buffer method to LED Matrix lib
1 parent cc19255 commit 876a619

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

libraries/LED_Matrix/src/LED_Matrix.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,14 @@ class LED_Matrix {
171171
j = (j + 1) % _lines;
172172
memcpy(framebuffer, (uint32_t*)frame, sizeof(frame));
173173
}
174+
void render_buffer(const uint32_t _frame[3]){
175+
uint32_t frame[3];
176+
static int j = 0;
177+
frame[0] = reverse(*(_frame+(j*4)+0));
178+
frame[1] = reverse(*(_frame+(j*4)+1));
179+
frame[2] = reverse(*(_frame+(j*4)+2));
180+
memcpy(framebuffer, (uint32_t*)frame, sizeof(frame));
181+
}
174182
void load_wrapper(const uint32_t frames[][4], uint32_t howMany) {
175183
_frames = (uint32_t*)frames;
176184
_lines = (howMany / 4) / sizeof(uint32_t);

0 commit comments

Comments
 (0)