pub struct Ltdc<'d, T: Instance, I: Interface = Rgb888> { /* private fields */ }Expand description
LTDC driver.
Implementations§
Source§impl<'d, T: Instance> Ltdc<'d, T, Rgb565>
impl<'d, T: Instance> Ltdc<'d, T, Rgb565>
Sourcepub fn new_with_pins(
peri: Peri<'d, T>,
_irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd,
clk: Peri<'d, impl ClkPin<T>>,
hsync: Peri<'d, impl HsyncPin<T>>,
vsync: Peri<'d, impl VsyncPin<T>>,
de: Peri<'d, impl DePin<T>>,
b3: Peri<'d, impl B3Pin<T>>,
b4: Peri<'d, impl B4Pin<T>>,
b5: Peri<'d, impl B5Pin<T>>,
b6: Peri<'d, impl B6Pin<T>>,
b7: Peri<'d, impl B7Pin<T>>,
g2: Peri<'d, impl G2Pin<T>>,
g3: Peri<'d, impl G3Pin<T>>,
g4: Peri<'d, impl G4Pin<T>>,
g5: Peri<'d, impl G5Pin<T>>,
g6: Peri<'d, impl G6Pin<T>>,
g7: Peri<'d, impl G7Pin<T>>,
r3: Peri<'d, impl R3Pin<T>>,
r4: Peri<'d, impl R4Pin<T>>,
r5: Peri<'d, impl R5Pin<T>>,
r6: Peri<'d, impl R6Pin<T>>,
r7: Peri<'d, impl R7Pin<T>>,
) -> Self
pub fn new_with_pins( peri: Peri<'d, T>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, clk: Peri<'d, impl ClkPin<T>>, hsync: Peri<'d, impl HsyncPin<T>>, vsync: Peri<'d, impl VsyncPin<T>>, de: Peri<'d, impl DePin<T>>, b3: Peri<'d, impl B3Pin<T>>, b4: Peri<'d, impl B4Pin<T>>, b5: Peri<'d, impl B5Pin<T>>, b6: Peri<'d, impl B6Pin<T>>, b7: Peri<'d, impl B7Pin<T>>, g2: Peri<'d, impl G2Pin<T>>, g3: Peri<'d, impl G3Pin<T>>, g4: Peri<'d, impl G4Pin<T>>, g5: Peri<'d, impl G5Pin<T>>, g6: Peri<'d, impl G6Pin<T>>, g7: Peri<'d, impl G7Pin<T>>, r3: Peri<'d, impl R3Pin<T>>, r4: Peri<'d, impl R4Pin<T>>, r5: Peri<'d, impl R5Pin<T>>, r6: Peri<'d, impl R6Pin<T>>, r7: Peri<'d, impl R7Pin<T>>, ) -> Self
Create a new RGB565 LTDC instance
Source§impl<'d, T: Instance> Ltdc<'d, T, Rgb666>
impl<'d, T: Instance> Ltdc<'d, T, Rgb666>
Sourcepub fn new_with_pins(
peri: Peri<'d, T>,
_irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd,
clk: Peri<'d, impl ClkPin<T>>,
hsync: Peri<'d, impl HsyncPin<T>>,
vsync: Peri<'d, impl VsyncPin<T>>,
de: Peri<'d, impl DePin<T>>,
b2: Peri<'d, impl B2Pin<T>>,
b3: Peri<'d, impl B3Pin<T>>,
b4: Peri<'d, impl B4Pin<T>>,
b5: Peri<'d, impl B5Pin<T>>,
b6: Peri<'d, impl B6Pin<T>>,
b7: Peri<'d, impl B7Pin<T>>,
g2: Peri<'d, impl G2Pin<T>>,
g3: Peri<'d, impl G3Pin<T>>,
g4: Peri<'d, impl G4Pin<T>>,
g5: Peri<'d, impl G5Pin<T>>,
g6: Peri<'d, impl G6Pin<T>>,
g7: Peri<'d, impl G7Pin<T>>,
r2: Peri<'d, impl R2Pin<T>>,
r3: Peri<'d, impl R3Pin<T>>,
r4: Peri<'d, impl R4Pin<T>>,
r5: Peri<'d, impl R5Pin<T>>,
r6: Peri<'d, impl R6Pin<T>>,
r7: Peri<'d, impl R7Pin<T>>,
) -> Self
pub fn new_with_pins( peri: Peri<'d, T>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, clk: Peri<'d, impl ClkPin<T>>, hsync: Peri<'d, impl HsyncPin<T>>, vsync: Peri<'d, impl VsyncPin<T>>, de: Peri<'d, impl DePin<T>>, b2: Peri<'d, impl B2Pin<T>>, b3: Peri<'d, impl B3Pin<T>>, b4: Peri<'d, impl B4Pin<T>>, b5: Peri<'d, impl B5Pin<T>>, b6: Peri<'d, impl B6Pin<T>>, b7: Peri<'d, impl B7Pin<T>>, g2: Peri<'d, impl G2Pin<T>>, g3: Peri<'d, impl G3Pin<T>>, g4: Peri<'d, impl G4Pin<T>>, g5: Peri<'d, impl G5Pin<T>>, g6: Peri<'d, impl G6Pin<T>>, g7: Peri<'d, impl G7Pin<T>>, r2: Peri<'d, impl R2Pin<T>>, r3: Peri<'d, impl R3Pin<T>>, r4: Peri<'d, impl R4Pin<T>>, r5: Peri<'d, impl R5Pin<T>>, r6: Peri<'d, impl R6Pin<T>>, r7: Peri<'d, impl R7Pin<T>>, ) -> Self
Create a new RGB666 LTDC instance
Source§impl<'d, T: Instance> Ltdc<'d, T, Rgb888>
impl<'d, T: Instance> Ltdc<'d, T, Rgb888>
Sourcepub fn new_with_pins(
peri: Peri<'d, T>,
_irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd,
clk: Peri<'d, impl ClkPin<T>>,
hsync: Peri<'d, impl HsyncPin<T>>,
vsync: Peri<'d, impl VsyncPin<T>>,
de: Peri<'d, impl DePin<T>>,
b0: Peri<'d, impl B0Pin<T>>,
b1: Peri<'d, impl B1Pin<T>>,
b2: Peri<'d, impl B2Pin<T>>,
b3: Peri<'d, impl B3Pin<T>>,
b4: Peri<'d, impl B4Pin<T>>,
b5: Peri<'d, impl B5Pin<T>>,
b6: Peri<'d, impl B6Pin<T>>,
b7: Peri<'d, impl B7Pin<T>>,
g0: Peri<'d, impl G0Pin<T>>,
g1: Peri<'d, impl G1Pin<T>>,
g2: Peri<'d, impl G2Pin<T>>,
g3: Peri<'d, impl G3Pin<T>>,
g4: Peri<'d, impl G4Pin<T>>,
g5: Peri<'d, impl G5Pin<T>>,
g6: Peri<'d, impl G6Pin<T>>,
g7: Peri<'d, impl G7Pin<T>>,
r0: Peri<'d, impl R0Pin<T>>,
r1: Peri<'d, impl R1Pin<T>>,
r2: Peri<'d, impl R2Pin<T>>,
r3: Peri<'d, impl R3Pin<T>>,
r4: Peri<'d, impl R4Pin<T>>,
r5: Peri<'d, impl R5Pin<T>>,
r6: Peri<'d, impl R6Pin<T>>,
r7: Peri<'d, impl R7Pin<T>>,
) -> Self
pub fn new_with_pins( peri: Peri<'d, T>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, clk: Peri<'d, impl ClkPin<T>>, hsync: Peri<'d, impl HsyncPin<T>>, vsync: Peri<'d, impl VsyncPin<T>>, de: Peri<'d, impl DePin<T>>, b0: Peri<'d, impl B0Pin<T>>, b1: Peri<'d, impl B1Pin<T>>, b2: Peri<'d, impl B2Pin<T>>, b3: Peri<'d, impl B3Pin<T>>, b4: Peri<'d, impl B4Pin<T>>, b5: Peri<'d, impl B5Pin<T>>, b6: Peri<'d, impl B6Pin<T>>, b7: Peri<'d, impl B7Pin<T>>, g0: Peri<'d, impl G0Pin<T>>, g1: Peri<'d, impl G1Pin<T>>, g2: Peri<'d, impl G2Pin<T>>, g3: Peri<'d, impl G3Pin<T>>, g4: Peri<'d, impl G4Pin<T>>, g5: Peri<'d, impl G5Pin<T>>, g6: Peri<'d, impl G6Pin<T>>, g7: Peri<'d, impl G7Pin<T>>, r0: Peri<'d, impl R0Pin<T>>, r1: Peri<'d, impl R1Pin<T>>, r2: Peri<'d, impl R2Pin<T>>, r3: Peri<'d, impl R3Pin<T>>, r4: Peri<'d, impl R4Pin<T>>, r5: Peri<'d, impl R5Pin<T>>, r6: Peri<'d, impl R6Pin<T>>, r7: Peri<'d, impl R7Pin<T>>, ) -> Self
Create a new LTDC driver. 8 pins per color channel for blue, green and red
Source§impl<'d, T: Instance, I: Interface> Ltdc<'d, T, I>
impl<'d, T: Instance, I: Interface> Ltdc<'d, T, I>
Sourcepub fn init(&mut self, config: &LtdcConfiguration)
pub fn init(&mut self, config: &LtdcConfiguration)
Initialise and enable the display
Sourcepub fn enable(&mut self)
pub fn enable(&mut self)
Set the enable bit in the control register and assert that it has been enabled
This does need to be called if init has already been called
Sourcepub fn disable(&mut self)
pub fn disable(&mut self)
Unset the enable bit in the control register and assert that it has been disabled
Sourcepub fn init_layer(
&mut self,
layer_config: &LtdcLayerConfig,
clut: Option<&[RgbColor]>,
)
pub fn init_layer( &mut self, layer_config: &LtdcLayerConfig, clut: Option<&[RgbColor]>, )
Initialise and enable the layer
clut - a 256 length color look-up table applies to L8, AL44 and AL88 pixel format and will default to greyscale if None supplied and these pixel formats are used
Sourcepub async fn set_buffer(
&mut self,
layer: LtdcLayer,
frame_buffer_addr: *const (),
) -> Result<(), Error>
pub async fn set_buffer( &mut self, layer: LtdcLayer, frame_buffer_addr: *const (), ) -> Result<(), Error>
Set the current buffer. The async function will return when buffer has been completely copied to the LCD screen frame_buffer_addr is a pointer to memory that should not move (best to make it static)
Sourcepub fn total_height(&self) -> u16
pub fn total_height(&self) -> u16
Get the total height including blanking.