Adafruit-RGB_matrix_Panel(32*16)
Dependencies: Adafruit-GFX
Revision 10:db4941188812, committed 2014-05-25
- Comitter:
- lelect
- Date:
- Sun May 25 12:32:49 2014 +0000
- Parent:
- 9:349baf041171
- Child:
- 11:c2e2eb66d353
- Commit message:
- Fix code for debugging
Changed in this revision
RGBmatrixPanel.cpp | Show annotated file Show diff for this revision Revisions of this file |
RGBmatrixPanel.h | Show annotated file Show diff for this revision Revisions of this file |
--- 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 } }
--- a/RGBmatrixPanel.h Sun May 25 12:24:33 2014 +0000 +++ b/RGBmatrixPanel.h Sun May 25 12:32:49 2014 +0000 @@ -51,6 +51,6 @@ DigitalOut _d,_sclk, _latch, _oe; Ticker _refresh; // Counters/pointers for interrupt handler: - volatile uint8_t row, plane; - volatile uint8_t *buffptr; + uint8_t row, plane; + uint8_t *buffptr; }; \ No newline at end of file