@@ -510,45 +510,41 @@ void MatrixPanel_I2S_DMA::clearFrameBuffer(bool _buff_id)
510
510
--row_idx;
511
511
512
512
ESP32_I2S_DMA_STORAGE_TYPE *row = fb->rowBits [row_idx]->getDataPtr (0 ); // set pointer to the HEAD of a buffer holding data for the entire matrix row
513
-
514
513
ESP32_I2S_DMA_STORAGE_TYPE abcde = (ESP32_I2S_DMA_STORAGE_TYPE)row_idx;
515
514
516
515
// get last pixel index in a row of all colourdepths
517
516
int x_pixel = fb->rowBits [row_idx]->width * fb->rowBits [row_idx]->colour_depth ;
518
-
517
+
519
518
abcde <<= BITS_ADDR_OFFSET; // shift row y-coord to match ABCDE bits in vector from 8 to 12
520
519
do
521
520
{
522
521
--x_pixel;
523
-
524
522
if (m_cfg.driver == HUB75_I2S_CFG::SM5266P)
525
523
{
526
- // modifications here for row shift register type SM5266P
527
- // https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-I2S-DMA/issues/164
528
- row[x_pixel] = abcde & (0x18 << BITS_ADDR_OFFSET); // mask out the bottom 3 bits which are the clk di bk inputs
524
+ // modifications here for row shift register type SM5266P
525
+ // https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-I2S-DMA/issues/164
526
+ row[x_pixel] = abcde & (0x18 << BITS_ADDR_OFFSET); // mask out the bottom 3 bits which are the clk di bk inputs
529
527
}
530
528
else if (m_cfg.driver == HUB75_I2S_CFG::DP3246_SM5368)
531
529
{
532
- row[ESP32_TX_FIFO_POSITION_ADJUST (x_pixel)] = 0x0000 ;
530
+ row[ESP32_TX_FIFO_POSITION_ADJUST (x_pixel)] = 0x0000 ;
533
531
}
534
532
else
535
533
{
536
- row[ESP32_TX_FIFO_POSITION_ADJUST (x_pixel)] = abcde;
534
+ row[ESP32_TX_FIFO_POSITION_ADJUST (x_pixel)] = abcde;
537
535
}
538
536
539
537
} while (x_pixel != fb->rowBits [row_idx]->width ); // spare the first "width's" worth of pixels as they are the LSB pixels/colordepth
540
538
541
- // colour_index[0] (LSB) x_pixels must be "marked" with a previous's row address, 'cause it is used to display
542
- // previous row while we pump in MSBs's for a new row
543
-
539
+ // The colour_index[0] (LSB) x_pixels must be "marked" with a previous's row address, because it is used to display
540
+ // previous row while we pump in MSBs's for the next row.
544
541
if (row_idx == 0 ) {
545
542
abcde = ROWS_PER_FRAME-1 ; // wrap around
546
543
} else {
547
544
abcde = row_idx-1 ;
548
545
}
549
-
546
+
550
547
abcde <<= BITS_ADDR_OFFSET; // shift row y-coord to match ABCDE bits in vector from 8 to 12
551
-
552
548
do
553
549
{
554
550
--x_pixel;
0 commit comments