Skip to main content

Block7Builder

Struct Block7Builder 

Source
pub struct Block7Builder { /* private fields */ }

Implementations§

Source§

impl Block7Builder

Source

pub fn erased(map: &BootImage) -> Self

Erased flash (all 0xFF), so every other byte is one the builder placed; map says where each region goes.

Source

pub fn from_generated( map: &BootImage, spec: &PanelSpec, g: &Generated, ) -> Result<Self>

The raster-state regions. void_line_columns must follow zero_regions, which clears 0x1000..0x1800 (docs/rendering.md). The chip page and the embedded .rcvbp are left to the caller: RAM pushes must not send them.

§Errors

Fails if the generated config lacks a record or a region builder refuses the spec.

Source

pub fn zero_regions(&mut self)

The gated-off regions, as the vendor’s zeroed buffers leave them.

Source

pub fn void_line_columns(&mut self, from: u16, to: u16)

0x1400: the void-line column table, one byte per line position (physical = a + table[a], GetVoidLineInfoPacks @ 0x1e58c0). 0xFF pushes from..to past the end of the chain; for this wiring width..2*width carried a fixed pattern instead (docs/rendering.md).

Source

pub fn basic_pack(&mut self, body: &[u8]) -> Result<()>

Page 0: the basic-parameter pack body.

§Errors

Rejects a body that is not exactly one page.

Source

pub fn chip_registers_from(&mut self, cfg: &Rcvbp) -> Result<()>

Page 0x09: record 0x84 verbatim; the card arms the drivers at boot only when this page is written. No record 0x84 leaves the page erased.

§Errors

Fails if record 0x84 is present but not one page.

Source

pub fn data_swap_from(&mut self, rec01: &[u8]) -> Result<()>

0x500: the data-swap pack body.

§Errors

Fails on a short record.

Source

pub fn module_positions_from(&mut self, rec01: &[u8]) -> Result<()>

0x600: the module-position table.

§Errors

Fails on a short record or an unimplemented split layout.

Source

pub fn anti_void_lines(&mut self)

0x1800: the anti-void-line counters.

Source

pub fn mapping_from(&mut self, cfg: &Rcvbp) -> Result<()>

0x3000: record 0x03 with each entry’s u16 flipped LE to BE; the vendor’s 16 pixel-sequence packs are this table, sliced.

§Errors

Fails if the record is missing, malformed, or too large.

Source

pub fn scan_table_from( &mut self, rec01: &[u8], card_scan_len: u16, ) -> Result<()>

0x6000: the scan table from the vendor’s bit-time solver.

§Errors

Fails for solver inputs outside the transcribed cases.

Source

pub fn rcvbp(&mut self, file: &[u8]) -> Result<()>

0x8000: the length-prefixed .rcvbp, erased flash after it.

§Errors

Rejects a file over the vendor’s clamp.

Source

pub fn finish(self) -> Block7

The image, what was placed, and which pages are no longer erased.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.