|
31 | 31 | // for each row:
|
32 | 32 | // for each bcd frame:
|
33 | 33 | // 0: 00111111 // row pixel count (minus one)
|
34 |
| -// 1 - 64: xxxxxbgr, xxxxxbgr, xxxxxbgr, ... // pixel data |
35 |
| -// 65 - 67: xxxxxxxx, xxxxxxxx, xxxxxxxx // dummy bytes to dword align |
36 |
| -// 68: xxxxrrrr // row select bits |
37 |
| -// 69 - 71: tttttttt, tttttttt, tttttttt // bcd tick count (0-65536) |
| 34 | +// 1: xxxxrrrr // row select bits |
| 35 | +// 2 - 65: xxxxxbgr, xxxxxbgr, xxxxxbgr, ... // pixel data |
| 36 | +// 66 - 67: xxxxxxxx, xxxxxxxx, // dummy bytes to dword align |
| 37 | +// 68 - 71: tttttttt, tttttttt, tttttttt // bcd tick count (0-65536) |
38 | 38 | //
|
39 | 39 | // .. and back to the start
|
40 | 40 |
|
@@ -154,13 +154,14 @@ namespace pimoroni {
|
154 | 154 | uint8_t *p = &bitstream[row * ROW_BYTES + (BCD_FRAME_BYTES * frame)];
|
155 | 155 |
|
156 | 156 | p[ 0] = 64 - 1; // row pixel count
|
157 |
| - p[68] = row; // row select |
| 157 | + p[ 1] = row; // row select |
158 | 158 |
|
159 | 159 | // set the number of bcd ticks for this frame
|
160 | 160 | uint32_t bcd_ticks = (1 << frame);
|
161 |
| - p[69] = (bcd_ticks & 0xff) >> 0; |
162 |
| - p[70] = (bcd_ticks & 0xff00) >> 8; |
163 |
| - p[71] = (bcd_ticks & 0xff0000) >> 16; |
| 161 | + p[68] = (bcd_ticks & 0xff) >> 0; |
| 162 | + p[69] = (bcd_ticks & 0xff00) >> 8; |
| 163 | + p[70] = (bcd_ticks & 0xff0000) >> 16; |
| 164 | + p[71] = (bcd_ticks & 0xff000000) >> 24; |
164 | 165 | }
|
165 | 166 | }
|
166 | 167 |
|
@@ -491,7 +492,7 @@ namespace pimoroni {
|
491 | 492 |
|
492 | 493 | // set the appropriate bits in the separate bcd frames
|
493 | 494 | for(uint8_t frame = 0; frame < BCD_FRAME_COUNT; frame++) {
|
494 |
| - uint8_t *p = &bitstream[y * ROW_BYTES + (BCD_FRAME_BYTES * frame) + 1 + x]; |
| 495 | + uint8_t *p = &bitstream[y * ROW_BYTES + (BCD_FRAME_BYTES * frame) + 2 + x]; |
495 | 496 |
|
496 | 497 | uint8_t red_bit = gamma_r & 0b1;
|
497 | 498 | uint8_t green_bit = gamma_g & 0b1;
|
|
0 commit comments