pub struct Dma2d<'d, T: Instance> { /* private fields */ }Expand description
DMA2D Peripheral
Implementations§
Source§impl<'d, T: Instance> Dma2d<'d, T>
impl<'d, T: Instance> Dma2d<'d, T>
Sourcepub fn set_buffer(&mut self, kind: BufferKind, buffer: Buffer2D)
pub fn set_buffer(&mut self, kind: BufferKind, buffer: Buffer2D)
Configure a Buffer2D
Sourcepub fn set_region(&mut self, kind: BufferKind, region: &Region2D)
pub fn set_region(&mut self, kind: BufferKind, region: &Region2D)
Configure a Region2D
Sourcepub fn set_color_config(&mut self, kind: BufferKind, config: &ColorConfig)
pub fn set_color_config(&mut self, kind: BufferKind, config: &ColorConfig)
Set the color configuration for a buffer
Sourcepub async fn fill(&mut self, dest: &Region2D, color: u32) -> Result<(), Error>
pub async fn fill(&mut self, dest: &Region2D, color: u32) -> Result<(), Error>
Fill the output buffer with a color into an output region
Sourcepub async fn blit(
&mut self,
fg: &Region2D,
dest: &Region2D,
fg_color: Option<u32>,
bg_color: Option<u32>,
) -> Result<(), Error>
pub async fn blit( &mut self, fg: &Region2D, dest: &Region2D, fg_color: Option<u32>, bg_color: Option<u32>, ) -> Result<(), Error>
Blit a source to a destination region using a fixed background color and alpha blending.
Pixel format conversion is applied to convert between input and output buffer
color configurations which must be set before calling blit using
Dma2d::set_color_config on both [BufferKind::Foreground'] and [BufferKind::Output`]
If the input buffer is A8, a fixed color may be provided in fg_color which
will set the foreground RGB channels from the FGCOLR register.
If None is provided as bg_color, the background defaults to black.
Auto Trait Implementations§
impl<'d, T> Freeze for Dma2d<'d, T>
impl<'d, T> RefUnwindSafe for Dma2d<'d, T>where
T: RefUnwindSafe,
impl<'d, T> Send for Dma2d<'d, T>
impl<'d, T> Sync for Dma2d<'d, T>where
T: Sync,
impl<'d, T> Unpin for Dma2d<'d, T>
impl<'d, T> !UnwindSafe for Dma2d<'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