esp_hal::lcd_cam::cam

Struct Camera

Source
pub struct Camera<'d> { /* private fields */ }
Available on crate feature unstable only.
Expand description

Represents the camera interface with DMA support.

Implementations§

Source§

impl<'d> Camera<'d>

Source

pub fn new<P, CH>( cam: Cam<'d>, channel: impl Peripheral<P = CH> + 'd, _pins: P, config: Config, ) -> Result<Self, ConfigError>
where CH: RxChannelFor<LCD_CAM>, P: RxPins,

Creates a new Camera instance with DMA support.

Source

pub fn apply_config(&mut self, config: &Config) -> Result<(), ConfigError>

Applies the configuration to the camera interface.

§Errors

ConfigError::Clock will be returned if the frequency passed in Config is too low.

Source§

impl<'d> Camera<'d>

Source

pub fn with_master_clock<MCLK: PeripheralOutput>( self, mclk: impl Peripheral<P = MCLK> + 'd, ) -> Self

Configures the master clock (MCLK) pin for the camera interface.

Source

pub fn with_pixel_clock<PCLK: PeripheralInput>( self, pclk: impl Peripheral<P = PCLK> + 'd, ) -> Self

Configures the pixel clock (PCLK) pin for the camera interface.

Source

pub fn with_ctrl_pins<VSYNC: PeripheralInput, HENABLE: PeripheralInput>( self, vsync: impl Peripheral<P = VSYNC> + 'd, h_enable: impl Peripheral<P = HENABLE> + 'd, ) -> Self

Configures the control pins for the camera interface (VSYNC and HENABLE).

Source

pub fn with_ctrl_pins_and_de<VSYNC: PeripheralInput, HSYNC: PeripheralInput, HENABLE: PeripheralInput>( self, vsync: impl Peripheral<P = VSYNC> + 'd, hsync: impl Peripheral<P = HSYNC> + 'd, h_enable: impl Peripheral<P = HENABLE> + 'd, ) -> Self

Configures the control pins for the camera interface (VSYNC, HSYNC, and HENABLE) with DE (data enable).

Source

pub fn receive<BUF: DmaRxBuffer>( self, buf: BUF, ) -> Result<CameraTransfer<'d, BUF>, (DmaError, Self, BUF)>

Starts a DMA transfer to receive data from the camera peripheral.

Auto Trait Implementations§

§

impl<'d> Freeze for Camera<'d>

§

impl<'d> RefUnwindSafe for Camera<'d>

§

impl<'d> Send for Camera<'d>

§

impl<'d> Sync for Camera<'d>

§

impl<'d> Unpin for Camera<'d>

§

impl<'d> !UnwindSafe for Camera<'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.

§

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.