Adafruit-RGB_matrix_Panel(32*16)
Dependencies: Adafruit-GFX
Diff: RGBmatrixPanel.cpp
- Revision:
- 10:db4941188812
- Parent:
- 9:349baf041171
- Child:
- 12:e632883f319f
--- a/RGBmatrixPanel.cpp Sun May 25 12:24:33 2014 +0000 +++ b/RGBmatrixPanel.cpp Sun May 25 12:32:49 2014 +0000 @@ -345,15 +345,13 @@ ptr = (uint8_t *)buffptr; log_debug("\t(row@plane)=(%d,%d)\r\n",row,plane); - int color; if(plane > 0) { //ptr[i]>>2 for(int i=0; i<32; i++) { - color=*(ptr+i); - color=(color>>2)&0x3F; - _dataBus.write(color); + _dataBus.write((*(ptr+i)>>2)); _sclk=1; _sclk=0; +#if 0 #ifdef DEBUG if(int(_dataBus)==color) { log_debug(" %02x",int(_dataBus)); @@ -362,15 +360,16 @@ log_debug(" (%x->%x)%s",color,int(_dataBus),"\0"); } #endif +#endif } buffptr += _rawWidth; } else { //((ptr[i]<<4)|((ptr[i+32]<<2)&0x0C)|((ptr[i+64])&0x03)); for(int i=0; i<32; i++) { - color=0x3F&((ptr[i]<<4)|((ptr[i+32]<<2)&0x0C)|((ptr[i+64])&0x03)); - _dataBus.write(color); + _dataBus.write(((ptr[i]<<4)|((ptr[i+32]<<2)&0x0C)|((ptr[i+64])&0x03))); _sclk=1; _sclk=0; +#if 0 #ifdef DEBUG if(int(_dataBus)==color) { log_debug(" %02x",int(_dataBus)); @@ -379,6 +378,7 @@ log_debug(" (%x->%x)%s",color,int(_dataBus),"\0"); } #endif +#endif } }