embassy-stm32

Crates

git

Versions

stm32h7b0ab

Flavors

๐Ÿ“ฃ We want to hear from you! Fill the Rust Embedded 2024 micro-survey.

Struct embassy_stm32::dcmi::Dcmi

source ยท
pub struct Dcmi<'d, T: Instance, Dma: FrameDma<T>> { /* private fields */ }
Expand description

DCMI driver.

Implementationsยง

sourceยง

impl<'d, T, Dma> Dcmi<'d, T, Dma>
where T: Instance, Dma: FrameDma<T>,

source

pub fn new_8bit( peri: impl Peripheral<P = T> + 'd, dma: impl Peripheral<P = Dma> + 'd, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, d0: impl Peripheral<P = impl D0Pin<T>> + 'd, d1: impl Peripheral<P = impl D1Pin<T>> + 'd, d2: impl Peripheral<P = impl D2Pin<T>> + 'd, d3: impl Peripheral<P = impl D3Pin<T>> + 'd, d4: impl Peripheral<P = impl D4Pin<T>> + 'd, d5: impl Peripheral<P = impl D5Pin<T>> + 'd, d6: impl Peripheral<P = impl D6Pin<T>> + 'd, d7: impl Peripheral<P = impl D7Pin<T>> + 'd, v_sync: impl Peripheral<P = impl VSyncPin<T>> + 'd, h_sync: impl Peripheral<P = impl HSyncPin<T>> + 'd, pixclk: impl Peripheral<P = impl PixClkPin<T>> + 'd, config: Config, ) -> Self

Create a new DCMI driver with 8 data bits.

source

pub fn new_10bit( peri: impl Peripheral<P = T> + 'd, dma: impl Peripheral<P = Dma> + 'd, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, d0: impl Peripheral<P = impl D0Pin<T>> + 'd, d1: impl Peripheral<P = impl D1Pin<T>> + 'd, d2: impl Peripheral<P = impl D2Pin<T>> + 'd, d3: impl Peripheral<P = impl D3Pin<T>> + 'd, d4: impl Peripheral<P = impl D4Pin<T>> + 'd, d5: impl Peripheral<P = impl D5Pin<T>> + 'd, d6: impl Peripheral<P = impl D6Pin<T>> + 'd, d7: impl Peripheral<P = impl D7Pin<T>> + 'd, d8: impl Peripheral<P = impl D8Pin<T>> + 'd, d9: impl Peripheral<P = impl D9Pin<T>> + 'd, v_sync: impl Peripheral<P = impl VSyncPin<T>> + 'd, h_sync: impl Peripheral<P = impl HSyncPin<T>> + 'd, pixclk: impl Peripheral<P = impl PixClkPin<T>> + 'd, config: Config, ) -> Self

Create a new DCMI driver with 10 data bits.

source

pub fn new_12bit( peri: impl Peripheral<P = T> + 'd, dma: impl Peripheral<P = Dma> + 'd, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, d0: impl Peripheral<P = impl D0Pin<T>> + 'd, d1: impl Peripheral<P = impl D1Pin<T>> + 'd, d2: impl Peripheral<P = impl D2Pin<T>> + 'd, d3: impl Peripheral<P = impl D3Pin<T>> + 'd, d4: impl Peripheral<P = impl D4Pin<T>> + 'd, d5: impl Peripheral<P = impl D5Pin<T>> + 'd, d6: impl Peripheral<P = impl D6Pin<T>> + 'd, d7: impl Peripheral<P = impl D7Pin<T>> + 'd, d8: impl Peripheral<P = impl D8Pin<T>> + 'd, d9: impl Peripheral<P = impl D9Pin<T>> + 'd, d10: impl Peripheral<P = impl D10Pin<T>> + 'd, d11: impl Peripheral<P = impl D11Pin<T>> + 'd, v_sync: impl Peripheral<P = impl VSyncPin<T>> + 'd, h_sync: impl Peripheral<P = impl HSyncPin<T>> + 'd, pixclk: impl Peripheral<P = impl PixClkPin<T>> + 'd, config: Config, ) -> Self

Create a new DCMI driver with 12 data bits.

source

pub fn new_14bit( peri: impl Peripheral<P = T> + 'd, dma: impl Peripheral<P = Dma> + 'd, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, d0: impl Peripheral<P = impl D0Pin<T>> + 'd, d1: impl Peripheral<P = impl D1Pin<T>> + 'd, d2: impl Peripheral<P = impl D2Pin<T>> + 'd, d3: impl Peripheral<P = impl D3Pin<T>> + 'd, d4: impl Peripheral<P = impl D4Pin<T>> + 'd, d5: impl Peripheral<P = impl D5Pin<T>> + 'd, d6: impl Peripheral<P = impl D6Pin<T>> + 'd, d7: impl Peripheral<P = impl D7Pin<T>> + 'd, d8: impl Peripheral<P = impl D8Pin<T>> + 'd, d9: impl Peripheral<P = impl D9Pin<T>> + 'd, d10: impl Peripheral<P = impl D10Pin<T>> + 'd, d11: impl Peripheral<P = impl D11Pin<T>> + 'd, d12: impl Peripheral<P = impl D12Pin<T>> + 'd, d13: impl Peripheral<P = impl D13Pin<T>> + 'd, v_sync: impl Peripheral<P = impl VSyncPin<T>> + 'd, h_sync: impl Peripheral<P = impl HSyncPin<T>> + 'd, pixclk: impl Peripheral<P = impl PixClkPin<T>> + 'd, config: Config, ) -> Self

Create a new DCMI driver with 14 data bits.

source

pub fn new_es_8bit( peri: impl Peripheral<P = T> + 'd, dma: impl Peripheral<P = Dma> + 'd, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, d0: impl Peripheral<P = impl D0Pin<T>> + 'd, d1: impl Peripheral<P = impl D1Pin<T>> + 'd, d2: impl Peripheral<P = impl D2Pin<T>> + 'd, d3: impl Peripheral<P = impl D3Pin<T>> + 'd, d4: impl Peripheral<P = impl D4Pin<T>> + 'd, d5: impl Peripheral<P = impl D5Pin<T>> + 'd, d6: impl Peripheral<P = impl D6Pin<T>> + 'd, d7: impl Peripheral<P = impl D7Pin<T>> + 'd, pixclk: impl Peripheral<P = impl PixClkPin<T>> + 'd, config: Config, ) -> Self

Create a new DCMI driver with 8 data bits, with embedded synchronization.

source

pub fn new_es_10bit( peri: impl Peripheral<P = T> + 'd, dma: impl Peripheral<P = Dma> + 'd, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, d0: impl Peripheral<P = impl D0Pin<T>> + 'd, d1: impl Peripheral<P = impl D1Pin<T>> + 'd, d2: impl Peripheral<P = impl D2Pin<T>> + 'd, d3: impl Peripheral<P = impl D3Pin<T>> + 'd, d4: impl Peripheral<P = impl D4Pin<T>> + 'd, d5: impl Peripheral<P = impl D5Pin<T>> + 'd, d6: impl Peripheral<P = impl D6Pin<T>> + 'd, d7: impl Peripheral<P = impl D7Pin<T>> + 'd, d8: impl Peripheral<P = impl D8Pin<T>> + 'd, d9: impl Peripheral<P = impl D9Pin<T>> + 'd, pixclk: impl Peripheral<P = impl PixClkPin<T>> + 'd, config: Config, ) -> Self

Create a new DCMI driver with 10 data bits, with embedded synchronization.

source

pub fn new_es_12bit( peri: impl Peripheral<P = T> + 'd, dma: impl Peripheral<P = Dma> + 'd, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, d0: impl Peripheral<P = impl D0Pin<T>> + 'd, d1: impl Peripheral<P = impl D1Pin<T>> + 'd, d2: impl Peripheral<P = impl D2Pin<T>> + 'd, d3: impl Peripheral<P = impl D3Pin<T>> + 'd, d4: impl Peripheral<P = impl D4Pin<T>> + 'd, d5: impl Peripheral<P = impl D5Pin<T>> + 'd, d6: impl Peripheral<P = impl D6Pin<T>> + 'd, d7: impl Peripheral<P = impl D7Pin<T>> + 'd, d8: impl Peripheral<P = impl D8Pin<T>> + 'd, d9: impl Peripheral<P = impl D9Pin<T>> + 'd, d10: impl Peripheral<P = impl D10Pin<T>> + 'd, d11: impl Peripheral<P = impl D11Pin<T>> + 'd, pixclk: impl Peripheral<P = impl PixClkPin<T>> + 'd, config: Config, ) -> Self

Create a new DCMI driver with 12 data bits, with embedded synchronization.

source

pub fn new_es_14bit( peri: impl Peripheral<P = T> + 'd, dma: impl Peripheral<P = Dma> + 'd, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, d0: impl Peripheral<P = impl D0Pin<T>> + 'd, d1: impl Peripheral<P = impl D1Pin<T>> + 'd, d2: impl Peripheral<P = impl D2Pin<T>> + 'd, d3: impl Peripheral<P = impl D3Pin<T>> + 'd, d4: impl Peripheral<P = impl D4Pin<T>> + 'd, d5: impl Peripheral<P = impl D5Pin<T>> + 'd, d6: impl Peripheral<P = impl D6Pin<T>> + 'd, d7: impl Peripheral<P = impl D7Pin<T>> + 'd, d8: impl Peripheral<P = impl D8Pin<T>> + 'd, d9: impl Peripheral<P = impl D9Pin<T>> + 'd, d10: impl Peripheral<P = impl D10Pin<T>> + 'd, d11: impl Peripheral<P = impl D11Pin<T>> + 'd, d12: impl Peripheral<P = impl D12Pin<T>> + 'd, d13: impl Peripheral<P = impl D13Pin<T>> + 'd, pixclk: impl Peripheral<P = impl PixClkPin<T>> + 'd, config: Config, ) -> Self

Create a new DCMI driver with 14 data bits, with embedded synchronization.

source

pub async fn capture(&mut self, buffer: &mut [u32]) -> Result<(), Error>

This method starts the capture and finishes when both the dma transfer and DCMI finish the frame transfer. The implication is that the input buffer size must be exactly the size of the captured frame.

Auto Trait Implementationsยง

ยง

impl<'d, T, Dma> Freeze for Dcmi<'d, T, Dma>
where T: Freeze, Dma: Freeze,

ยง

impl<'d, T, Dma> RefUnwindSafe for Dcmi<'d, T, Dma>

ยง

impl<'d, T, Dma> Send for Dcmi<'d, T, Dma>
where T: Send, Dma: Send,

ยง

impl<'d, T, Dma> Sync for Dcmi<'d, T, Dma>
where T: Sync, Dma: Sync,

ยง

impl<'d, T, Dma> Unpin for Dcmi<'d, T, Dma>
where T: Unpin, Dma: Unpin,

ยง

impl<'d, T, Dma> !UnwindSafe for Dcmi<'d, T, Dma>

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, U> TryFrom<U> for T
where U: Into<T>,

sourceยง

type Error = Infallible

The type returned in the event of a conversion error.
sourceยง

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

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.