Skip to main content

DsiDpi

Struct DsiDpi 

Source
pub struct DsiDpi<'d> { /* private fields */ }
Expand description

Video-mode (DPI) streaming handle.

Consumes the MipiDsi bus and drives the DSI host in video mode, continuously streaming frame buffers via VDMA.

Implementations§

Source§

impl<'d> DsiDpi<'d>

Source

pub fn framebuffer_mut(&mut self) -> &mut [u8]

Returns a mutable slice to the back (not-currently-displayed) frame buffer.

With a single frame buffer this is the same buffer the DMA may be reading — the caller is responsible for synchronisation in that case.

Source

pub fn commit(&mut self)

Flip the back buffer to the display.

Flushes the rendered back buffer from CPU cache to PSRAM, then updates the source address in every LLI so the DMA switches to the new pixels on its next block boundary.

LLI_VALID re-arming is handled entirely by the vdma_block_done_isr interrupt handler, which fires after every frame block and keeps the DMA channel running indefinitely without software restarts.

Source

pub fn wait_for_vsync(&mut self)

Block until the DSI bridge signals the start of the next vertical blank.

Use this to pace rendering to the display refresh rate. Any vsync event that is already pending (i.e. fired while the CPU was busy rendering) will be returned immediately.

Source

pub fn wait_for_vsync_async(&mut self) -> impl Future<Output = ()>

Async: yield until the next vsync event.

Trait Implementations§

Source§

impl Drop for DsiDpi<'_>

Available on crate feature unstable only.
Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl<'d> !Send for DsiDpi<'d>

§

impl<'d> !Sync for DsiDpi<'d>

§

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

§

impl<'d> Freeze for DsiDpi<'d>

§

impl<'d> RefUnwindSafe for DsiDpi<'d>

§

impl<'d> Unpin for DsiDpi<'d>

§

impl<'d> UnsafeUnpin for DsiDpi<'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.