Skip to content

Commit 38bef28

Browse files
committed
adjusted whitestar to be compatible with new pio frame reading
1 parent 7595a72 commit 38bef28

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/dmd_reader.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,13 +495,14 @@ void dmd_dma_handler() {
495495

496496
for (int l=0; l<lcd_height; l++) {
497497
for (int w=0; w<lcd_wordsperline; w++) {
498-
v = (src1[w] + src2[w]) >> 1;
498+
v = src1[w]*2+src2[2]*1;
499499
dst[w]=v;
500500
}
501501
src1 += lcd_wordsperline*2; // source skips 2 lines forward
502502
src2 += lcd_wordsperline*2;
503503
dst += lcd_wordsperline; // destination skips only one line
504504
}
505+
505506
} else if (lcd_lineoversampling==LINEOVERSAMPLING_SAM) {
506507
uint16_t i=0;
507508
uint32_t *dst, *src1, *src2, *src3, *src4;
@@ -596,9 +597,9 @@ bool init()
596597
lcd_height = 32;
597598
lcd_bitsperpixel = 2; // Whitestar is 2bpp
598599
lcd_pixelsperbyte = 8 / lcd_bitsperpixel;
599-
lcd_planesperframe = 2; // in Whitestar, there's a MSB and a LSB plane
600+
lcd_planesperframe = 1; // in Whitestar, there's a MSB and a LSB plane
600601
lcd_lineoversampling = LINEOVERSAMPLING_WHITESTAR; // in Whitestar each line is sent twice
601-
lcd_mergeplanes = MERGEPLANES_ADDSHIFT; // required for correct 2bpp merge
602+
lcd_mergeplanes = MERGEPLANES_ADD; // required for correct 2bpp merge
602603
} else if (dmd_type == DMD_SPIKE1) {
603604
dmd_pio = pio0;
604605
offset = pio_add_program(dmd_pio, &dmd_reader_spike_program);

0 commit comments

Comments
 (0)