pub struct QuarterScan<const PANEL_ROWS: usize, const PANEL_COLS: usize, V: Variant = SectionsSwapped> { /* private fields */ }Expand description
Pixel remapper for “quarter-scan” panels (1/16-scan on 64×64 panels)
Some LED panels — particularly 64×64 modules — use fewer row-address steps than the row count would suggest. A 1/16-scan 64×64 panel has only 16 row addresses (A–D) instead of the 32 a 1/32-scan panel would use, and lights four rows at a time: rows n, n+16, n+32 and n+48 for address n. To make this work with the two HUB75 data channels, the panel internally wires each channel’s shift register as two side-by-side 64-column sections, so the physical framebuffer is 2× wider and 2× shorter than the logical display (32×128 for a 64×64 panel).
The mapping splits the panel into four groups of PANEL_ROWS / 4
consecutive rows and places them side by side. How the four groups are
wired to the four (channel, section) slots varies by driver chip and
manufacturer (FM6126, ICN2037, MBI5153, etc.); the V type parameter
selects the wiring — see the quarter_scan module for the built-in
variants. The default quarter_scan::SectionsSwapped (verified on
hardware) maps:
| virtual rows | channel | section (framebuffer columns) |
|---|---|---|
0..16 | 1 (top) | 1 (64..128) |
16..32 | 1 (top) | 0 (0..64) |
32..48 | 2 (bottom) | 1 (64..128) |
48..64 | 2 (bottom) | 0 (0..64) |
§Type Parameters
PANEL_ROWS— Logical row count of the panel (e.g. 64)PANEL_COLS— Logical column count of the panel (e.g. 64)V— Group → slot wiring variant (seequarter_scan); defaults toquarter_scan::SectionsSwapped
§Framebuffer geometry
The underlying framebuffer must be allocated with:
- rows =
PANEL_ROWS / 2(e.g. 32 for a 64-row panel — 16 addresses × 2 channels) - cols =
PANEL_COLS * 2(e.g. 128 for a 64-column panel — 2 sections per channel)
For the bitplane framebuffers this means
DmaFrameBuffer<{ PANEL_ROWS / 4 }, { PANEL_COLS * 2 }, PLANES> because
their NROWS parameter counts row-address steps (row pairs).