Skip to main content

MipiDsi

Struct MipiDsi 

Source
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>

Source

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.

Source

pub fn dbi(&mut self, virtual_channel: u8) -> DsiDbi<'_, 'd>

Attach a command-mode (DBI) interface for panel init sequences.

Source

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.

Auto Trait Implementations§

§

impl<'d> !UnwindSafe for MipiDsi<'d>

§

impl<'d> Freeze for MipiDsi<'d>

§

impl<'d> RefUnwindSafe for MipiDsi<'d>

§

impl<'d> Send for MipiDsi<'d>

§

impl<'d> Sync for MipiDsi<'d>

§

impl<'d> Unpin for MipiDsi<'d>

§

impl<'d> UnsafeUnpin for MipiDsi<'d>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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
§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.