pub struct Srm<'d, Dm: DriverMode> { /* private fields */ }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>
impl<'d> Srm<'d, Blocking>
Sourcepub fn new(
ppa: PPA<'d>,
tx: impl Into<AnyDma2dTxChannel<'d>>,
rx: impl Into<AnyDma2dRxChannel<'d>>,
) -> Self
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>
impl<Dm: DriverMode> Srm<'_, Dm>
Sourcepub fn run(
&mut self,
input: Input<'_>,
output: Output<'_>,
config: Config,
) -> Result<(), Error>
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
Error::InvalidSizewhen dimensions, offsets, or buffer lengths are invalid.Error::InvalidScalewhen a scaling factor is invalid.Error::UnalignedBufferwhen a destination address or length is unaligned.Error::UnsupportedMemoryRegionwhen a buffer is outside the supported memory regions.Error::Hardwareon a peripheral error.
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.