pub struct Ltdc<'d, T: Instance> { /* private fields */ }
Expand description
LTDC driver.
Implementations§
Source§impl<'d, T: Instance> Ltdc<'d, T>
impl<'d, T: Instance> Ltdc<'d, T>
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>>,
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>>, 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
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)
Trait Implementations§
Auto Trait Implementations§
impl<'d, T> Freeze for Ltdc<'d, T>where
T: Freeze,
impl<'d, T> RefUnwindSafe for Ltdc<'d, T>where
T: RefUnwindSafe,
impl<'d, T> Send for Ltdc<'d, T>
impl<'d, T> Sync for Ltdc<'d, T>where
T: Sync,
impl<'d, T> Unpin for Ltdc<'d, T>where
T: Unpin,
impl<'d, T> !UnwindSafe for Ltdc<'d, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more