diff options
| author | mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> | 2020-08-21 16:48:56 +0100 |
|---|---|---|
| committer | mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> | 2020-08-21 16:48:56 +0100 |
| commit | 43913150feef950ea998bc380bf662c2444d3910 (patch) | |
| tree | bbbc21971b4b984093a498ff8122d9cf3ab3a7ff | |
| parent | 501211ca6d81238b5a262586512353d5ce049028 (diff) | |
Syntax Highlighting
| -rw-r--r-- | ESP32-RGB64x32MatrixPanel-I2S-DMA.h | 18 | ||||
| -rw-r--r-- | keywords.txt | 16 |
2 files changed, 25 insertions, 9 deletions
diff --git a/ESP32-RGB64x32MatrixPanel-I2S-DMA.h b/ESP32-RGB64x32MatrixPanel-I2S-DMA.h index fda8b0a..47346e8 100644 --- a/ESP32-RGB64x32MatrixPanel-I2S-DMA.h +++ b/ESP32-RGB64x32MatrixPanel-I2S-DMA.h @@ -148,17 +148,17 @@ struct frameStruct { rowColorDepthStruct rowdata[ROWS_PER_FRAME]; }; -typedef struct rgb_24 { - rgb_24() : rgb_24(0,0,0) {} - rgb_24(uint8_t r, uint8_t g, uint8_t b) { +typedef struct RGB24 { + RGB24() : RGB24(0,0,0) {} + RGB24(uint8_t r, uint8_t g, uint8_t b) { red = r; green = g; blue = b; } - rgb_24& operator=(const rgb_24& col); + RGB24& operator=(const RGB24& col); uint8_t red; uint8_t green; uint8_t blue; -} rgb_24; +} RGB24; /***************************************************************************************/ @@ -250,7 +250,7 @@ class RGB64x32MatrixPanel_I2S_DMA : public Adafruit_GFX { void fillScreenRGB888(uint8_t r, uint8_t g, uint8_t b); void drawPixelRGB565(int16_t x, int16_t y, uint16_t color); void drawPixelRGB888(int16_t x, int16_t y, uint8_t r, uint8_t g, uint8_t b); - void drawPixelRGB24(int16_t x, int16_t y, rgb_24 color); + void drawPixelRGB24(int16_t x, int16_t y, RGB24 color); void drawIcon (int *ico, int16_t x, int16_t y, int16_t cols, int16_t rows); // Color 444 is a 4 bit scale, so 0 to 15, color 565 takes a 0-255 bit value, so scale up by 255/15 (i.e. 17)! @@ -260,7 +260,7 @@ class RGB64x32MatrixPanel_I2S_DMA : public Adafruit_GFX { uint16_t color565(uint8_t r, uint8_t g, uint8_t b); // This is what is used by Adafruit GFX! // Converts RGB333 to RGB565 - uint16_t Color333(uint8_t r, uint8_t g, uint8_t b); // This is what is used by Adafruit GFX! Not sure why they have a capital 'C' for this particular function. + uint16_t color333(uint8_t r, uint8_t g, uint8_t b); // This is what is used by Adafruit GFX! Not sure why they have a capital 'C' for this particular function. inline void flipDMABuffer() { @@ -380,7 +380,7 @@ inline void RGB64x32MatrixPanel_I2S_DMA::drawPixelRGB888(int16_t x, int16_t y, u updateMatrixDMABuffer( x, y, r, g, b); } -inline void RGB64x32MatrixPanel_I2S_DMA::drawPixelRGB24(int16_t x, int16_t y, rgb_24 color) +inline void RGB64x32MatrixPanel_I2S_DMA::drawPixelRGB24(int16_t x, int16_t y, RGB24 color) { updateMatrixDMABuffer( x, y, color.red, color.green, color.blue); } @@ -399,7 +399,7 @@ inline uint16_t RGB64x32MatrixPanel_I2S_DMA::color565(uint8_t r, uint8_t g, uint } // Promote 3/3/3 RGB to Adafruit_GFX 5/6/5 RRRrrGGGgggBBBbb -inline uint16_t RGB64x32MatrixPanel_I2S_DMA::Color333(uint8_t r, uint8_t g, uint8_t b) { +inline uint16_t RGB64x32MatrixPanel_I2S_DMA::color333(uint8_t r, uint8_t g, uint8_t b) { return ((r & 0x7) << 13) | ((r & 0x6) << 10) | ((g & 0x7) << 8) | ((g & 0x7) << 5) | ((b & 0x7) << 2) | ((b & 0x6) >> 1); diff --git a/keywords.txt b/keywords.txt new file mode 100644 index 0000000..96d5db6 --- /dev/null +++ b/keywords.txt @@ -0,0 +1,16 @@ +RGB64x32MatrixPanel_I2S_DMA KEYWORD1 +fillScreen KEYWORD2 +clearScreen KEYWORD2 +fillScreenRGB888 KEYWORD2 +drawPixelRGB565 KEYWORD2 +drawPixelRGB888 KEYWORD2 +drawPixelRGB24 KEYWORD2 +drawIcon KEYWORD2 +color444 KEYWORD2 +color565 KEYWORD2 +color333 KEYWORD2 +flipDMABuffer KEYWORD2 +showDMABuffer KEYWORD2 +setPanelBrightness KEYWORD2 +setMinRefreshRate KEYWORD2 +RGB24 KEYWORD1
\ No newline at end of file |
