pub struct MipiDsi<'d> { /* private fields */ }Expand description
MIPI DSI bus.
Holds ownership of the MIPI_DSI virtual peripheral and one VDMA channel
singleton, and keeps their clocks enabled for as long as this value lives.
Implementations§
Source§impl<'d> MipiDsi<'d>
impl<'d> MipiDsi<'d>
Sourcepub fn new(
dsi: MIPI_DSI<'d>,
vdma_channel: impl VdmaDmaChannel + 'd,
config: Config,
) -> Result<Self, ConfigError>
pub fn new( dsi: MIPI_DSI<'d>, vdma_channel: impl VdmaDmaChannel + 'd, config: Config, ) -> Result<Self, ConfigError>
Initialise the MIPI DSI bus.
Enables APB clock, resets the bridge, powers up the D-PHY LDO, configures D-PHY PLL, and polls for PLL lock + lane-stopped status before returning.
vdma_channel is one of the four VDMA_CH* peripheral singletons;
it is consumed to ensure exclusive access to that DMA channel for the
lifetime of the bus.
Sourcepub fn dbi(&mut self, virtual_channel: u8) -> DsiDbi<'_, 'd>
pub fn dbi(&mut self, virtual_channel: u8) -> DsiDbi<'_, 'd>
Attach a command-mode (DBI) interface for panel init sequences.
Sourcepub fn dpi(
self,
config: DpiConfig,
framebuffers: &[&'d mut [u8]],
) -> Result<DsiDpi<'d>, ConfigError>
pub fn dpi( self, config: DpiConfig, framebuffers: &[&'d mut [u8]], ) -> Result<DsiDpi<'d>, ConfigError>
Enter video-mode (DPI) streaming.
Consumes self; the returned DsiDpi keeps clocks enabled for the
lifetime of the streaming session.
framebuffers must contain 1–3 slices, each of exactly
h_active × v_active × bytes_per_pixel bytes, 64-byte aligned, and
allocated from PSRAM.