Skip to main content

Srm

Struct Srm 

Source
pub struct Srm<'d, Dm: DriverMode> { /* private fields */ }
Available on crate feature unstable only.
Expand description

PPA SRM driver.

The driver owns the PPA and one DMA2D channel in each direction.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Implementations§

Source§

impl<'d> Srm<'d, Blocking>

Source

pub fn new( ppa: PPA<'d>, tx: impl Into<AnyDma2dTxChannel<'d>>, rx: impl Into<AnyDma2dRxChannel<'d>>, ) -> Self

Creates a blocking SRM driver with a transmit and receive DMA2D channel.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source§

impl<Dm: DriverMode> Srm<'_, Dm>

Source

pub fn run( &mut self, input: Input<'_>, output: Output<'_>, config: Config, ) -> Result<(), Error>

Scales, rotates, mirrors, and converts a source image into a destination region.

The requirements for images and transformations are in Input, Output, and Config. Buffers must also meet the module-level requirements.

On success, pixels outside the destination region are unchanged.

§Errors

The destination contents are unspecified after a hardware error.

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Trait Implementations§

Source§

impl<'d, Dm: Debug + DriverMode> Debug for Srm<'d, Dm>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'d, Dm> !UnwindSafe for Srm<'d, Dm>

§

impl<'d, Dm> Forget for Srm<'d, Dm>

§

impl<'d, Dm> Freeze for Srm<'d, Dm>
where PhantomData<&'d mut ()>: Freeze, PhantomData<Dm>: Freeze,

§

impl<'d, Dm> Move for Srm<'d, Dm>

§

impl<'d, Dm> RefUnwindSafe for Srm<'d, Dm>
where Dm: RefUnwindSafe,

§

impl<'d, Dm> Send for Srm<'d, Dm>
where Dm: Send,

§

impl<'d, Dm> Sync for Srm<'d, Dm>
where Dm: Sync,

§

impl<'d, Dm> Unpin for Srm<'d, Dm>
where Dm: Unpin, &'d mut (): Unpin,

§

impl<'d, Dm> UnsafeUnpin for Srm<'d, Dm>
where PhantomData<&'d mut ()>: UnsafeUnpin, PhantomData<Dm>: UnsafeUnpin,

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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> Same for T

Source§

type Output = T

Should always be Self
§

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

§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.