embassy-stm32

Crates

git

Versions

stm32f479ni

Flavors

embassy_stm32::dcmi

Struct 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.