pub struct Camera<'d> { /* private fields */ }
unstable
only.Expand description
Represents the camera interface with DMA support.
Implementations§
Source§impl<'d> Camera<'d>
impl<'d> Camera<'d>
Sourcepub fn new(
cam: Cam<'d>,
channel: impl RxChannelFor<LCD_CAM<'d>>,
config: Config,
) -> Result<Self, ConfigError>
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.
Sourcepub fn apply_config(&mut self, config: &Config) -> Result<(), ConfigError>
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>
impl<'d> Camera<'d>
Sourcepub fn with_master_clock(self, mclk: impl PeripheralOutput<'d>) -> Self
pub fn with_master_clock(self, mclk: impl PeripheralOutput<'d>) -> Self
Configures the master clock (MCLK) pin for the camera interface.
Sourcepub fn with_pixel_clock(self, pclk: impl PeripheralInput<'d>) -> Self
pub fn with_pixel_clock(self, pclk: impl PeripheralInput<'d>) -> Self
Configures the pixel clock (PCLK) pin for the camera interface.
Sourcepub fn with_vsync(self, pin: impl PeripheralInput<'d>) -> Self
pub fn with_vsync(self, pin: impl PeripheralInput<'d>) -> Self
Configures the Vertical Sync (VSYNC) pin for the camera interface.
Sourcepub fn with_hsync(self, pin: impl PeripheralInput<'d>) -> Self
pub fn with_hsync(self, pin: impl PeripheralInput<'d>) -> Self
Configures the Horizontal Sync (HSYNC) pin for the camera interface.
Sourcepub fn with_h_enable(self, pin: impl PeripheralInput<'d>) -> Self
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”.
Sourcepub fn with_data0(self, pin: impl PeripheralInput<'d>) -> Self
pub fn with_data0(self, pin: impl PeripheralInput<'d>) -> Self
Configures the DATA 0 pin for the camera interface.
Sourcepub fn with_data1(self, pin: impl PeripheralInput<'d>) -> Self
pub fn with_data1(self, pin: impl PeripheralInput<'d>) -> Self
Configures the DATA 1 pin for the camera interface.
Sourcepub fn with_data2(self, pin: impl PeripheralInput<'d>) -> Self
pub fn with_data2(self, pin: impl PeripheralInput<'d>) -> Self
Configures the DATA 2 pin for the camera interface.
Sourcepub fn with_data3(self, pin: impl PeripheralInput<'d>) -> Self
pub fn with_data3(self, pin: impl PeripheralInput<'d>) -> Self
Configures the DATA 3 pin for the camera interface.
Sourcepub fn with_data4(self, pin: impl PeripheralInput<'d>) -> Self
pub fn with_data4(self, pin: impl PeripheralInput<'d>) -> Self
Configures the DATA 4 pin for the camera interface.
Sourcepub fn with_data5(self, pin: impl PeripheralInput<'d>) -> Self
pub fn with_data5(self, pin: impl PeripheralInput<'d>) -> Self
Configures the DATA 5 pin for the camera interface.
Sourcepub fn with_data6(self, pin: impl PeripheralInput<'d>) -> Self
pub fn with_data6(self, pin: impl PeripheralInput<'d>) -> Self
Configures the DATA 6 pin for the camera interface.
Sourcepub fn with_data7(self, pin: impl PeripheralInput<'d>) -> Self
pub fn with_data7(self, pin: impl PeripheralInput<'d>) -> Self
Configures the DATA 7 pin for the camera interface.
Sourcepub fn with_data8(self, pin: impl PeripheralInput<'d>) -> Self
pub fn with_data8(self, pin: impl PeripheralInput<'d>) -> Self
Configures the DATA 8 pin for the camera interface.
Sourcepub fn with_data9(self, pin: impl PeripheralInput<'d>) -> Self
pub fn with_data9(self, pin: impl PeripheralInput<'d>) -> Self
Configures the DATA 9 pin for the camera interface.
Sourcepub fn with_data10(self, pin: impl PeripheralInput<'d>) -> Self
pub fn with_data10(self, pin: impl PeripheralInput<'d>) -> Self
Configures the DATA 10 pin for the camera interface.
Sourcepub fn with_data11(self, pin: impl PeripheralInput<'d>) -> Self
pub fn with_data11(self, pin: impl PeripheralInput<'d>) -> Self
Configures the DATA 11 pin for the camera interface.
Sourcepub fn with_data12(self, pin: impl PeripheralInput<'d>) -> Self
pub fn with_data12(self, pin: impl PeripheralInput<'d>) -> Self
Configures the DATA 12 pin for the camera interface.
Sourcepub fn with_data13(self, pin: impl PeripheralInput<'d>) -> Self
pub fn with_data13(self, pin: impl PeripheralInput<'d>) -> Self
Configures the DATA 13 pin for the camera interface.
Sourcepub fn with_data14(self, pin: impl PeripheralInput<'d>) -> Self
pub fn with_data14(self, pin: impl PeripheralInput<'d>) -> Self
Configures the DATA 14 pin for the camera interface.
Sourcepub fn with_data15(self, pin: impl PeripheralInput<'d>) -> Self
pub fn with_data15(self, pin: impl PeripheralInput<'d>) -> Self
Configures the DATA 15 pin for the camera interface.
Sourcepub fn receive<BUF: DmaRxBuffer>(
self,
buf: BUF,
) -> Result<CameraTransfer<'d, BUF>, (DmaError, Self, BUF)>
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.