19 #ifndef RGBMATRIXPANEL_H 20 #define RGBMATRIXPANEL_H 26 #include "pins_arduino.h" 28 #include "Adafruit_GFX.h" 31 typedef uint8_t PortType;
32 #elif defined(__arm__) || defined(__xtensa__) 33 typedef uint32_t PortType;
55 RGBmatrixPanel(uint8_t a, uint8_t b, uint8_t c, uint8_t clk, uint8_t lat,
56 uint8_t oe,
boolean dbuf
57 #
if defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_ESP32)
59 uint8_t *pinlist = NULL
79 RGBmatrixPanel(uint8_t a, uint8_t b, uint8_t c, uint8_t d, uint8_t clk,
80 uint8_t lat, uint8_t oe,
boolean dbuf, uint8_t width = 32
81 #
if defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_ESP32)
83 uint8_t *pinlist = NULL
101 void drawPixel(int16_t x, int16_t y, uint16_t c);
153 uint16_t
Color333(uint8_t r, uint8_t g, uint8_t b);
165 uint16_t
Color444(uint8_t r, uint8_t g, uint8_t b);
178 uint16_t
Color888(uint8_t r, uint8_t g, uint8_t b);
192 uint16_t
Color888(uint8_t r, uint8_t g, uint8_t b,
boolean gflag);
206 uint16_t
ColorHSV(
long hue, uint8_t sat, uint8_t val,
boolean gflag);
209 uint8_t *matrixbuff[2];
211 volatile uint8_t backindex;
212 volatile boolean swapflag;
215 void init(uint8_t rows, uint8_t a, uint8_t b, uint8_t c, uint8_t clk,
216 uint8_t lat, uint8_t oe,
boolean dbuf, uint8_t width
217 #
if defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_ESP32)
238 volatile PortType *latport;
239 volatile PortType *oeport;
240 volatile PortType *addraport;
241 volatile PortType *addrbport;
242 volatile PortType *addrcport;
243 volatile PortType *addrdport;
245 #if defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_ESP32) 247 volatile PortType *outsetreg;
248 volatile PortType *outclrreg;
250 PortType expand[256];
253 volatile uint8_t row;
254 volatile uint8_t plane;
255 volatile uint8_t *buffptr;
258 #endif // RGBMATRIXPANEL_H void updateDisplay(void)
Refresh matrix contents following one or more drawing calls.
Definition: RGBmatrixPanel.cpp:829
uint8_t * backBuffer(void)
Get address of back buffer – can then load/store data directly. Format is very strangely interleaved...
Definition: RGBmatrixPanel.cpp:687
void drawPixel(int16_t x, int16_t y, uint16_t c)
Lowest-level pixel drawing function required by Adafruit_GFX. Does not have an immediate effect – mu...
Definition: RGBmatrixPanel.cpp:589
uint16_t ColorHSV(long hue, uint8_t sat, uint8_t val, boolean gflag)
Convert hue, saturation, value (used in some existing graphics code in other projects and languages) ...
Definition: RGBmatrixPanel.cpp:519
void begin(void)
Start RGB matrix. Initializes timers and interrupts.
Definition: RGBmatrixPanel.cpp:248
Class encapsulating RGB LED matrix functionality.
Definition: RGBmatrixPanel.h:39
void swapBuffers(boolean)
If using double buffering, swap the front and back buffers.
Definition: RGBmatrixPanel.cpp:695
uint16_t Color888(uint8_t r, uint8_t g, uint8_t b)
Decimate 8-bits R,G,B (used in a lot of existing graphics code in other projects and languages) to th...
Definition: RGBmatrixPanel.cpp:501
void fillScreen(uint16_t c)
Fill entire matrix a single color. Does not have an immediate effect – must call updateDisplay() aft...
Definition: RGBmatrixPanel.cpp:674
uint16_t Color444(uint8_t r, uint8_t g, uint8_t b)
Promote 4-bits R,G,B (handled by the current version of this library) to the '565' color format used ...
Definition: RGBmatrixPanel.cpp:493
RGBmatrixPanel(uint8_t a, uint8_t b, uint8_t c, uint8_t clk, uint8_t lat, uint8_t oe, boolean dbuf)
Constructor for 16x32 panel.
Definition: RGBmatrixPanel.cpp:199
void dumpMatrix(void)
Dump display contents to the Serial Monitor, adding some formatting to simplify copy-and-paste of dat...
Definition: RGBmatrixPanel.cpp:713
uint16_t Color333(uint8_t r, uint8_t g, uint8_t b)
Promote 3-bits R,G,B (used by earlier versions of this library) to the '565' color format used in Ada...
Definition: RGBmatrixPanel.cpp:486