Struct Dpi

Source
pub struct Dpi<'d, Dm: DriverMode> { /* private fields */ }
Available on crate feature unstable only.
Expand description

Represents the RGB LCD interface.

Implementations§

Source§

impl<'d, Dm> Dpi<'d, Dm>
where Dm: DriverMode,

Source

pub fn new( lcd: Lcd<'d, Dm>, channel: impl TxChannelFor<LCD_CAM<'d>>, config: Config, ) -> Result<Self, ConfigError>

Create a new instance of the RGB/DPI driver.

Source

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

Applies the configuration to the peripheral.

§Errors

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

Source

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

Assign the VSYNC pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the VSYNC signal.

Source

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

Assign the HSYNC pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the HSYNC signal.

Source

pub fn with_de(self, pin: impl PeripheralOutput<'d>) -> Self

Assign the DE pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the DE signal.

Source

pub fn with_pclk(self, pin: impl PeripheralOutput<'d>) -> Self

Assign the PCLK pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the PCLK signal.

Source

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

Assign the DATA_0 pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the DATA_0 signal.

Source

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

Assign the DATA_1 pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the DATA_1 signal.

Source

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

Assign the DATA_2 pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the DATA_2 signal.

Source

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

Assign the DATA_3 pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the DATA_3 signal.

Source

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

Assign the DATA_4 pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the DATA_4 signal.

Source

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

Assign the DATA_5 pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the DATA_5 signal.

Source

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

Assign the DATA_6 pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the DATA_6 signal.

Source

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

Assign the DATA_7 pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the DATA_7 signal.

Source

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

Assign the DATA_8 pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the DATA_8 signal.

Source

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

Assign the DATA_9 pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the DATA_9 signal.

Source

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

Assign the DATA_10 pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the DATA_10 signal.

Source

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

Assign the DATA_11 pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the DATA_11 signal.

Source

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

Assign the DATA_12 pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the DATA_12 signal.

Source

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

Assign the DATA_13 pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the DATA_13 signal.

Source

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

Assign the DATA_14 pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the DATA_14 signal.

Source

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

Assign the DATA_15 pin for the LCD_CAM.

Sets the specified pin to push-pull output and connects it to the DATA_15 signal.

Source

pub fn send<TX: DmaTxBuffer>( self, next_frame_en: bool, buf: TX, ) -> Result<DpiTransfer<'d, TX, Dm>, (DmaError, Self, TX)>

Sending out the DmaTxBuffer to the RGB/DPI interface.

  • next_frame_en: Automatically send the next frame data when the current frame is sent out.

Auto Trait Implementations§

§

impl<'d, Dm> Freeze for Dpi<'d, Dm>

§

impl<'d, Dm> RefUnwindSafe for Dpi<'d, Dm>
where Dm: RefUnwindSafe,

§

impl<'d, Dm> Send for Dpi<'d, Dm>
where Dm: Send,

§

impl<'d, Dm> Sync for Dpi<'d, Dm>
where Dm: Sync,

§

impl<'d, Dm> Unpin for Dpi<'d, Dm>
where Dm: Unpin,

§

impl<'d, Dm> !UnwindSafe for Dpi<'d, Dm>

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.