pub struct Metadata {
pub area: Option<Area>,
pub frame_control: FrameControl,
}Expand description
Metadata about the pixel data transfer.
Advanced display buses (like MIPI DSI or QSPI with DMA) often require more context than just the raw pixel bytes. This struct carries that side-band information, allowing the bus implementation to orchestrate the transfer correctly.
Fields§
§area: Option<Area>The rectangular area on the display this data corresponds to.
If Some, the bus may use this to set the active window before sending data.
If None, the data is assumed to be a continuation of the previous stream.
frame_control: FrameControlFlags for frame synchronization (start/end of frame).
Implementations§
Source§impl Metadata
impl Metadata
Sourcepub fn new_full_screen(w: u16, h: u16) -> Self
pub fn new_full_screen(w: u16, h: u16) -> Self
Creates metadata for a full screen update.
This sets the area to the full display dimensions and marks the transfer as both the start and end of a frame. Use this for standard full-frame refreshing.
Sourcepub fn new_continue_stream() -> Self
pub fn new_continue_stream() -> Self
Creates metadata for continuing a stream of pixel data without resetting the area or frame markers.
Use this when splitting a large frame into multiple smaller chunks for transfer.
Sourcepub fn new_from_parts(area: Option<Area>, frame_control: FrameControl) -> Self
pub fn new_from_parts(area: Option<Area>, frame_control: FrameControl) -> Self
Creates metadata with specific area and frame control settings.
Use this for partial updates or specialized transfer patterns.