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>
impl<'d, T, Dma> Dcmi<'d, T, Dma>
sourcepub 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
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.
sourcepub 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
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.
sourcepub 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
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.
sourcepub 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
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.
sourcepub 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
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.
sourcepub 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
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.
sourcepub 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
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.
sourcepub 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
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.
sourcepub async fn capture(&mut self, buffer: &mut [u32]) -> Result<(), Error>
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.
Note that when buffer.len() > 0xffff
the capture future requires some real-time guarantees to be upheld
(must be polled fast enough so the buffers get switched before data is overwritten).
It is therefore recommended that it is run on higher priority executor.