pub struct I2sParallelTransfer<'d, BUF, Dm>where
BUF: DmaTxBuffer,
Dm: DriverMode,{ /* private fields */ }unstable only.Expand description
Represents an ongoing (or potentially finished) transfer using the I2S parallel interface.
§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, BUF, Dm> I2sParallelTransfer<'d, BUF, Dm>where
BUF: DmaTxBuffer,
Dm: DriverMode,
impl<'d, BUF, Dm> I2sParallelTransfer<'d, BUF, Dm>where
BUF: DmaTxBuffer,
Dm: DriverMode,
Source§impl<'d, BUF> I2sParallelTransfer<'d, BUF, Blocking>where
BUF: DmaTxBuffer,
Interrupt management for an ongoing transfer.
impl<'d, BUF> I2sParallelTransfer<'d, BUF, Blocking>where
BUF: DmaTxBuffer,
Interrupt management for an ongoing transfer.
The driver itself has been consumed by I2sParallel::send, so these
methods take &self and allow an interrupt handler to manage the
interrupt sources through the transfer object.
§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.
Sourcepub fn set_interrupt_handler(&mut self, handler: InterruptHandler)
pub fn set_interrupt_handler(&mut self, handler: InterruptHandler)
Sets the interrupt handler for the I2S parallel peripheral.
The new handler removes the old handler. This method does not turn on
the interrupt sources. Use Self::listen to turn on interrupt
sources.
Sourcepub fn listen(&self, interrupts: impl Into<EnumSet<I2sParallelInterrupt>>)
pub fn listen(&self, interrupts: impl Into<EnumSet<I2sParallelInterrupt>>)
Turns on the given interrupt sources.
Sourcepub fn unlisten(&self, interrupts: impl Into<EnumSet<I2sParallelInterrupt>>)
pub fn unlisten(&self, interrupts: impl Into<EnumSet<I2sParallelInterrupt>>)
Turns off the given interrupt sources.
Sourcepub fn clear_interrupts(
&self,
interrupts: impl Into<EnumSet<I2sParallelInterrupt>>,
)
pub fn clear_interrupts( &self, interrupts: impl Into<EnumSet<I2sParallelInterrupt>>, )
Clears the interrupt flags of the given interrupt sources.
Sourcepub fn interrupts(&self) -> EnumSet<I2sParallelInterrupt>
pub fn interrupts(&self) -> EnumSet<I2sParallelInterrupt>
Returns the interrupt sources that are set.
Source§impl<BUF> I2sParallelTransfer<'_, BUF, Async>where
BUF: DmaTxBuffer,
impl<BUF> I2sParallelTransfer<'_, BUF, Async>where
BUF: DmaTxBuffer,
Sourcepub async fn wait_for_done(&mut self) -> Result<(), DmaError>
pub async fn wait_for_done(&mut self) -> Result<(), DmaError>
Waits for Self::is_done to return true.
§Errors
Returns a DmaError when the transfer ends with a descriptor error.
§Cancellation Safety
This method is cancellation safe. Dropping the future does not stop the transfer, and the method can be called again to wait for the transfer to complete.
Trait Implementations§
Source§impl<BUF, Dm> Deref for I2sParallelTransfer<'_, BUF, Dm>where
BUF: DmaTxBuffer,
Dm: DriverMode,
impl<BUF, Dm> Deref for I2sParallelTransfer<'_, BUF, Dm>where
BUF: DmaTxBuffer,
Dm: DriverMode,
Source§impl<BUF, Dm> DerefMut for I2sParallelTransfer<'_, BUF, Dm>where
BUF: DmaTxBuffer,
Dm: DriverMode,
impl<BUF, Dm> DerefMut for I2sParallelTransfer<'_, BUF, Dm>where
BUF: DmaTxBuffer,
Dm: DriverMode,
Source§impl<BUF, Dm> Drop for I2sParallelTransfer<'_, BUF, Dm>where
BUF: DmaTxBuffer,
Dm: DriverMode,
impl<BUF, Dm> Drop for I2sParallelTransfer<'_, BUF, Dm>where
BUF: DmaTxBuffer,
Dm: DriverMode,
Auto Trait Implementations§
impl<'d, BUF, Dm> !UnwindSafe for I2sParallelTransfer<'d, BUF, Dm>
impl<'d, BUF, Dm> Freeze for I2sParallelTransfer<'d, BUF, Dm>where
<BUF as DmaTxBuffer>::View: Freeze,
impl<'d, BUF, Dm> RefUnwindSafe for I2sParallelTransfer<'d, BUF, Dm>where
<BUF as DmaTxBuffer>::View: RefUnwindSafe,
Dm: RefUnwindSafe,
impl<'d, BUF, Dm> Send for I2sParallelTransfer<'d, BUF, Dm>where
<BUF as DmaTxBuffer>::View: Send,
Dm: Send,
impl<'d, BUF, Dm> Sync for I2sParallelTransfer<'d, BUF, Dm>where
<BUF as DmaTxBuffer>::View: Sync,
Dm: Sync,
impl<'d, BUF, Dm> Unpin for I2sParallelTransfer<'d, BUF, Dm>where
<BUF as DmaTxBuffer>::View: Unpin,
Dm: Unpin,
impl<'d, BUF, Dm> UnsafeUnpin for I2sParallelTransfer<'d, BUF, Dm>where
<BUF as DmaTxBuffer>::View: UnsafeUnpin,
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> CryptoRng for Twhere
T: DerefMut,
<T as Deref>::Target: CryptoRng,
impl<R> CryptoRng for Rwhere
R: TryCryptoRng<Error = Infallible> + ?Sized,
§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
§impl<P, T> Receiver for Pwhere
P: Deref<Target = T> + ?Sized,
T: ?Sized,
impl<P, T> Receiver for Pwhere
P: Deref<Target = T> + ?Sized,
T: ?Sized,
impl<R> RngCore for Rwhere
R: Rng,
impl<R> TryCryptoRng for Rwhere
R: CryptoRng + ?Sized,
impl<R> TryCryptoRng for Rwhere
R: DerefMut,
<R as Deref>::Target: TryCryptoRng,
§impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
§impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,
impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,
Source§impl<R> TryRng for Rwhere
R: DerefMut,
<R as Deref>::Target: TryRng,
impl<R> TryRng for Rwhere
R: DerefMut,
<R as Deref>::Target: TryRng,
Source§type Error = <<R as Deref>::Target as TryRng>::Error
type Error = <<R as Deref>::Target as TryRng>::Error
Source§fn try_next_u32(&mut self) -> Result<u32, <R as TryRng>::Error>
fn try_next_u32(&mut self) -> Result<u32, <R as TryRng>::Error>
u32.Source§fn try_next_u64(&mut self) -> Result<u64, <R as TryRng>::Error>
fn try_next_u64(&mut self) -> Result<u64, <R as TryRng>::Error>
u64.Source§fn try_fill_bytes(&mut self, dst: &mut [u8]) -> Result<(), <R as TryRng>::Error>
fn try_fill_bytes(&mut self, dst: &mut [u8]) -> Result<(), <R as TryRng>::Error>
dst entirely with random data.Source§impl<R> TryRngCore for Rwhere
R: RngCore + ?Sized,
impl<R> TryRngCore for Rwhere
R: RngCore + ?Sized,
Source§fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
u32.Source§fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
u64.Source§fn try_fill_bytes(
&mut self,
dst: &mut [u8],
) -> Result<(), <R as TryRngCore>::Error>
fn try_fill_bytes( &mut self, dst: &mut [u8], ) -> Result<(), <R as TryRngCore>::Error>
dest entirely with random data.Source§fn unwrap_err(self) -> UnwrapErr<Self>where
Self: Sized,
fn unwrap_err(self) -> UnwrapErr<Self>where
Self: Sized,
UnwrapErr wrapper.Source§fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
UnwrapMut wrapper.