Adafruit-RGB_matrix_Panel(32*16)
Diff: RGBmatrixPanel.cpp
- Revision:
- 13:0ceb1b8893e9
- Parent:
- 12:e632883f319f
--- a/RGBmatrixPanel.cpp Sun May 25 13:41:34 2014 +0000 +++ b/RGBmatrixPanel.cpp Mon May 26 09:14:54 2014 +0000 @@ -355,7 +355,6 @@ void RGBmatrixPanel::updateDisplay(void) { - uint8_t *ptr; _oe=1; _latch=1; if(++plane >= nPlanes) { // Advance plane counter. Maxed out? @@ -373,17 +372,16 @@ } _oe=0; _latch=0; - ptr = (uint8_t *)buffptr; if(plane > 0) { for(int i=0; i<32; i++) { - _dataBus.write((*(ptr+i)>>2)); + _dataBus.write((*(buffptr+i)>>2)); _sclk=1; _sclk=0; } buffptr += _rawWidth; } else { for(int i=0; i<32; i++) { - _dataBus.write(((ptr[i]<<4)|((ptr[i+32]<<2)&0x0C)|((ptr[i+64])&0x03))); + _dataBus.write(((buffptr[i]<<4)|((buffptr[i+32]<<2)&0x0C)|((buffptr[i+64])&0x03))); _sclk=1; _sclk=0; }