embassy-stm32

Crates

git

Versions

stm32f769ng

Flavors

embassy_stm32::ltdc

Struct Ltdc

Source
pub struct Ltdc<'d, T: Instance> { /* private fields */ }
Expand description

LTDC driver.

Implementations§

Source§

impl<'d, T: Instance> Ltdc<'d, T>

Source

pub fn new(peri: impl Peripheral<P = T> + 'd) -> Self

Note: Full-Duplex modes are not supported at this time

Source

pub fn new_with_pins( peri: impl Peripheral<P = T> + 'd, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, clk: impl Peripheral<P = impl ClkPin<T>> + 'd, hsync: impl Peripheral<P = impl HsyncPin<T>> + 'd, vsync: impl Peripheral<P = impl VsyncPin<T>> + 'd, b0: impl Peripheral<P = impl B0Pin<T>> + 'd, b1: impl Peripheral<P = impl B1Pin<T>> + 'd, b2: impl Peripheral<P = impl B2Pin<T>> + 'd, b3: impl Peripheral<P = impl B3Pin<T>> + 'd, b4: impl Peripheral<P = impl B4Pin<T>> + 'd, b5: impl Peripheral<P = impl B5Pin<T>> + 'd, b6: impl Peripheral<P = impl B6Pin<T>> + 'd, b7: impl Peripheral<P = impl B7Pin<T>> + 'd, g0: impl Peripheral<P = impl G0Pin<T>> + 'd, g1: impl Peripheral<P = impl G1Pin<T>> + 'd, g2: impl Peripheral<P = impl G2Pin<T>> + 'd, g3: impl Peripheral<P = impl G3Pin<T>> + 'd, g4: impl Peripheral<P = impl G4Pin<T>> + 'd, g5: impl Peripheral<P = impl G5Pin<T>> + 'd, g6: impl Peripheral<P = impl G6Pin<T>> + 'd, g7: impl Peripheral<P = impl G7Pin<T>> + 'd, r0: impl Peripheral<P = impl R0Pin<T>> + 'd, r1: impl Peripheral<P = impl R1Pin<T>> + 'd, r2: impl Peripheral<P = impl R2Pin<T>> + 'd, r3: impl Peripheral<P = impl R3Pin<T>> + 'd, r4: impl Peripheral<P = impl R4Pin<T>> + 'd, r5: impl Peripheral<P = impl R5Pin<T>> + 'd, r6: impl Peripheral<P = impl R6Pin<T>> + 'd, r7: impl Peripheral<P = impl R7Pin<T>> + 'd, ) -> Self

Create a new LTDC driver. 8 pins per color channel for blue, green and red

Source

pub fn init(&mut self, config: &LtdcConfiguration)

Initialise and enable the display

Source

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

Source

pub fn disable(&mut self)

Unset the enable bit in the control register and assert that it has been disabled

Source

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

Source

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§

Source§

impl<'d, T: Instance> Drop for Ltdc<'d, T>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.