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( cam: Cam<'d>, channel: impl RxChannelFor<LCD_CAM<'d>>, config: Config, ) -> Result<Self, ConfigError>

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(self, mclk: impl PeripheralOutput<'d>) -> Self

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

Source

pub fn with_pixel_clock(self, pclk: impl PeripheralInput<'d>) -> Self

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

Source

pub fn with_vsync(self, pin: impl PeripheralInput<'d>) -> Self

Configures the Vertical Sync (VSYNC) pin for the camera interface.

Source

pub fn with_hsync(self, pin: impl PeripheralInput<'d>) -> Self

Configures the Horizontal Sync (HSYNC) pin for the camera interface.

Source

pub fn with_h_enable(self, pin: impl PeripheralInput<'d>) -> Self

Configures the Horizontal Enable (HENABLE) pin for the camera interface.

Also known as “Data Enable”.

Source

pub fn with_data0(self, pin: impl PeripheralInput<'d>) -> Self

Configures the DATA 0 pin for the camera interface.

Source

pub fn with_data1(self, pin: impl PeripheralInput<'d>) -> Self

Configures the DATA 1 pin for the camera interface.

Source

pub fn with_data2(self, pin: impl PeripheralInput<'d>) -> Self

Configures the DATA 2 pin for the camera interface.

Source

pub fn with_data3(self, pin: impl PeripheralInput<'d>) -> Self

Configures the DATA 3 pin for the camera interface.

Source

pub fn with_data4(self, pin: impl PeripheralInput<'d>) -> Self

Configures the DATA 4 pin for the camera interface.

Source

pub fn with_data5(self, pin: impl PeripheralInput<'d>) -> Self

Configures the DATA 5 pin for the camera interface.

Source

pub fn with_data6(self, pin: impl PeripheralInput<'d>) -> Self

Configures the DATA 6 pin for the camera interface.

Source

pub fn with_data7(self, pin: impl PeripheralInput<'d>) -> Self

Configures the DATA 7 pin for the camera interface.

Source

pub fn with_data8(self, pin: impl PeripheralInput<'d>) -> Self

Configures the DATA 8 pin for the camera interface.

Source

pub fn with_data9(self, pin: impl PeripheralInput<'d>) -> Self

Configures the DATA 9 pin for the camera interface.

Source

pub fn with_data10(self, pin: impl PeripheralInput<'d>) -> Self

Configures the DATA 10 pin for the camera interface.

Source

pub fn with_data11(self, pin: impl PeripheralInput<'d>) -> Self

Configures the DATA 11 pin for the camera interface.

Source

pub fn with_data12(self, pin: impl PeripheralInput<'d>) -> Self

Configures the DATA 12 pin for the camera interface.

Source

pub fn with_data13(self, pin: impl PeripheralInput<'d>) -> Self

Configures the DATA 13 pin for the camera interface.

Source

pub fn with_data14(self, pin: impl PeripheralInput<'d>) -> Self

Configures the DATA 14 pin for the camera interface.

Source

pub fn with_data15(self, pin: impl PeripheralInput<'d>) -> Self

Configures the DATA 15 pin for the camera interface.

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.

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.