hub75_framebuffer/bitplane/mod.rs
1//! Bitplane-oriented framebuffer implementations for HUB75 LED panels.
2//!
3//! These framebuffers store colour data as one bit-plane per colour bit
4//! (typically 8 planes for full 8-bit colour). To render, output each plane a
5//! number of times equal to its bit-weight (the MSB plane 2^7 times, the LSB
6//! plane once) — either with a DMA descriptor chain or by reprogramming the
7//! DMA address/length registers per segment from a transfer-complete
8//! interrupt — so that the weighted repetition counts produce correct BCM
9//! brightness.
10//!
11//! All layouts store planes **LSB-first** (plane 0 = LSB), and each BCM
12//! segment streams a contiguous *suffix* of planes, repeated just enough
13//! times to bring each plane's total coverage to its bit-weight — halving
14//! the number of DMA transfers per scan with identical brightness. Drivers
15//! should follow the [`FrameBuffer`](crate::FrameBuffer) segment sequence
16//! rather than assuming an order; see its documentation for the
17//! segment/group/sequence terminology.
18//!
19//! Two variants are provided:
20//!
21//! - [`plain`] -- 16-bit entries with all signals (address, latch, OE, colour)
22//! packed into each word. No external latch circuit needed.
23//! - [`latched`] -- 8-bit entries with separate address bytes, requiring an
24//! external latch circuit but halving per-entry memory.
25
26pub mod latched;
27pub mod plain;