Merge pull request #487 from beta-tester/master
minimal optimization and adjustment
This commit is contained in:
commit
9943fcd97d
2 changed files with 9 additions and 6 deletions
|
@ -347,9 +347,9 @@ void IRAM_ATTR MatrixPanel_I2S_DMA::updateMatrixDMABuffer(uint16_t x_coord, uint
|
||||||
green16 = lumConvTab[green];
|
green16 = lumConvTab[green];
|
||||||
blue16 = lumConvTab[blue];
|
blue16 = lumConvTab[blue];
|
||||||
#else
|
#else
|
||||||
red16 = red << 8;
|
red16 = red << 8 | red;
|
||||||
green16 = green << 8;
|
green16 = green << 8 | green;
|
||||||
blue16 = blue << 8;
|
blue16 = blue << 8 | blue;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* When using the drawPixel, we are obviously only changing the value of one x,y position,
|
/* When using the drawPixel, we are obviously only changing the value of one x,y position,
|
||||||
|
|
|
@ -880,9 +880,12 @@ private:
|
||||||
*/
|
*/
|
||||||
inline void MatrixPanel_I2S_DMA::color565to888(const uint16_t color, uint8_t &r, uint8_t &g, uint8_t &b)
|
inline void MatrixPanel_I2S_DMA::color565to888(const uint16_t color, uint8_t &r, uint8_t &g, uint8_t &b)
|
||||||
{
|
{
|
||||||
r = ((((color >> 11) & 0x1F) * 527) + 23) >> 6;
|
r = (color >> 8) & 0xf8;
|
||||||
g = ((((color >> 5) & 0x3F) * 259) + 33) >> 6;
|
g = (color >> 3) & 0xfc;
|
||||||
b = (((color & 0x1F) * 527) + 23) >> 6;
|
b = (color << 3);
|
||||||
|
r |= r >> 5;
|
||||||
|
g |= g >> 6;
|
||||||
|
b |= b >> 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void MatrixPanel_I2S_DMA::drawPixel(int16_t x, int16_t y, uint16_t color) // adafruit virtual void override
|
inline void MatrixPanel_I2S_DMA::drawPixel(int16_t x, int16_t y, uint16_t color) // adafruit virtual void override
|
||||||
|
|
Loading…
Reference in a new issue