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(
lcd: Lcd<'d, Dm>,
channel: impl TxChannelFor<LCD_CAM<'d>>,
config: Config,
) -> Result<Self, ConfigError>
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.
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(self, pin: impl PeripheralOutput<'d>) -> Self
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.
Sourcepub fn with_hsync(self, pin: impl PeripheralOutput<'d>) -> Self
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.
Sourcepub fn with_de(self, pin: impl PeripheralOutput<'d>) -> Self
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.
Sourcepub fn with_pclk(self, pin: impl PeripheralOutput<'d>) -> Self
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.
Sourcepub fn with_data0(self, pin: impl PeripheralOutput<'d>) -> Self
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.
Sourcepub fn with_data1(self, pin: impl PeripheralOutput<'d>) -> Self
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.
Sourcepub fn with_data2(self, pin: impl PeripheralOutput<'d>) -> Self
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.
Sourcepub fn with_data3(self, pin: impl PeripheralOutput<'d>) -> Self
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.
Sourcepub fn with_data4(self, pin: impl PeripheralOutput<'d>) -> Self
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.
Sourcepub fn with_data5(self, pin: impl PeripheralOutput<'d>) -> Self
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.
Sourcepub fn with_data6(self, pin: impl PeripheralOutput<'d>) -> Self
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.
Sourcepub fn with_data7(self, pin: impl PeripheralOutput<'d>) -> Self
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.
Sourcepub fn with_data8(self, pin: impl PeripheralOutput<'d>) -> Self
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.
Sourcepub fn with_data9(self, pin: impl PeripheralOutput<'d>) -> Self
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.
Sourcepub fn with_data10(self, pin: impl PeripheralOutput<'d>) -> Self
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.
Sourcepub fn with_data11(self, pin: impl PeripheralOutput<'d>) -> Self
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.
Sourcepub fn with_data12(self, pin: impl PeripheralOutput<'d>) -> Self
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.
Sourcepub fn with_data13(self, pin: impl PeripheralOutput<'d>) -> Self
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.
Sourcepub fn with_data14(self, pin: impl PeripheralOutput<'d>) -> Self
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.
Sourcepub fn with_data15(self, pin: impl PeripheralOutput<'d>) -> Self
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.
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.