pub struct Dpi<'d, Dm: DriverMode> { /* private fields */ }
unstable
only.Expand description
Represents the RGB LCD interface.
Implementations§
Source§impl<'d, Dm> Dpi<'d, Dm>where
Dm: DriverMode,
impl<'d, Dm> Dpi<'d, Dm>where
Dm: DriverMode,
Sourcepub fn new<CH>(
lcd: Lcd<'d, Dm>,
channel: impl Peripheral<P = CH> + 'd,
config: Config,
) -> Result<Self, ConfigError>where
CH: TxChannelFor<LCD_CAM>,
pub fn new<CH>(
lcd: Lcd<'d, Dm>,
channel: impl Peripheral<P = CH> + 'd,
config: Config,
) -> Result<Self, ConfigError>where
CH: TxChannelFor<LCD_CAM>,
Create a new instance of the RGB/DPI driver.
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 peripheral.
§Errors
ConfigError::Clock
variant will be returned if the frequency passed
in Config
is too low.
Sourcepub fn with_vsync<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_vsync<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn with_hsync<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_hsync<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn with_de<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_de<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn with_pclk<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_pclk<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn with_data0<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_data0<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn with_data1<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_data1<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn with_data2<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_data2<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn with_data3<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_data3<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn with_data4<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_data4<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn with_data5<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_data5<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn with_data6<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_data6<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn with_data7<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_data7<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn with_data8<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_data8<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn with_data9<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_data9<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn with_data10<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_data10<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn with_data11<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_data11<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn with_data12<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_data12<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn with_data13<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_data13<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn with_data14<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_data14<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn with_data15<S: PeripheralOutput>(
self,
pin: impl Peripheral<P = S> + 'd,
) -> Self
pub fn with_data15<S: PeripheralOutput>( self, pin: impl Peripheral<P = S> + '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.
Sourcepub fn send<TX: DmaTxBuffer>(
self,
next_frame_en: bool,
buf: TX,
) -> Result<DpiTransfer<'d, TX, Dm>, (DmaError, Self, TX)>
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.