pub struct PanelSpec {
pub name: String,
pub meta: Meta,
pub module: Module,
pub screen: Screen,
pub chip: Chip,
pub color: Color,
pub current: Current,
pub timing: Timing,
pub mapping: Mapping,
pub boot: Boot,
pub record01_overrides: BTreeMap<usize, u8>,
}Fields§
§name: StringName used for output files.
meta: MetaWhere the values came from and how far they are trusted.
module: Module§screen: Screen§chip: Chip§color: Color§current: Current§timing: Timing§mapping: Mapping§boot: Boot§record01_overrides: BTreeMap<usize, u8>Raw record 0x01 byte overrides ("0x043" = 0x20), applied last. The
bench spec’s +0x02F = 1 lives here; nothing displays without it.
Implementations§
Source§impl PanelSpec
impl PanelSpec
Sourcepub fn to_toml(&self) -> Result<String>
pub fn to_toml(&self) -> Result<String>
The spec as TOML, tables in the order config/panels/*.toml use;
parse reads it back to the same values.
§Errors
Fails when a value cannot be written as TOML.
Sourcepub fn chip_library(&self, load: Loader<'_>) -> Result<ChipLibrary>
pub fn chip_library(&self, load: Loader<'_>) -> Result<ChipLibrary>
The spec’s chip library, with load mapping [chip].library to TOML
text.
§Errors
Fails when load does, or on a malformed library.
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Check the spec against what the record can express.
§Errors
Rejects geometry the record cannot hold.
Sourcepub fn serial_clock(&self, chip: &ChipLibrary) -> u16
pub fn serial_clock(&self, chip: &ChipLibrary) -> u16
The serial clock (record +0x021): the spec’s, else the chip’s default.
Sourcepub fn gray_bits(&self, chip: &ChipLibrary) -> Result<u8>
pub fn gray_bits(&self, chip: &ChipLibrary) -> Result<u8>
Grayscale depth: the spec’s override, else the vendor’s derivation from the chip registers.
§Errors
Fails if the library lacks the registers the derivation reads.
Sourcepub fn screen_extent_in_line_dir(&self) -> u16
pub fn screen_extent_in_line_dir(&self) -> u16
The screen extent along the data-line direction (vendor
GetMaxInLineDir, before void adjustments).
Sourcepub fn module_input_count(&self) -> u8
pub fn module_input_count(&self) -> u8
Vendor GetModuleInputCount: the 16-pixel grid unit over the module
dimension along the line direction, at least 1.
Sourcepub fn modules_in_line_dir(&self) -> u16
pub fn modules_in_line_dir(&self) -> u16
Modules chained along the data-line direction (vendor
GetModuleCountInLineDir): screen extent / module extent on that axis.
Sourcepub fn one_scan_len(&self) -> u16
pub fn one_scan_len(&self) -> u16
Clocks in one scan line (vendor GetOneScanLen): W x stored H / scan.
Sourcepub fn card_scan_len(&self) -> u16
pub fn card_scan_len(&self) -> u16
Clocks in one card scan line (vendor GetCardScanLen): OneScanLen
scaled by the modules along the line direction.