Skip to main content

ParlIoTxTransfer

Struct ParlIoTxTransfer 

Source
pub struct ParlIoTxTransfer<'d, BUF: DmaTxBuffer, Dm: DriverMode> { /* private fields */ }
Expand description

Represents an ongoing (or potentially finished) transfer using the PARL_IO TX.

Implementations§

Source§

impl<BUF: DmaTxBuffer> ParlIoTxTransfer<'_, BUF, Async>

Source

pub async fn wait_for_done(&mut self)

Waits for Self::is_done to return true.

§Cancellation Safety

This method is cancellation safe. Dropping the future does not stop the transfer, and this method can be called again to wait for completion.

Source§

impl<'d, BUF: DmaTxBuffer, Dm: DriverMode> ParlIoTxTransfer<'d, BUF, Dm>

Source

pub fn is_done(&self) -> bool

Returns whether Self::wait returns immediately.

Source

pub fn wait(self) -> (Result<(), DmaError>, ParlIoTx<'d, Dm>, BUF::Final)

Waits for the transfer to finish and returns the peripheral and buffer.

Source§

impl<'d, BUF> ParlIoTxTransfer<'d, BUF, Blocking>
where BUF: DmaTxBuffer,

Interrupt management for an ongoing transfer.

The driver itself has been consumed by ParlIoTx::write, 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.

Source

pub fn listen(&self, interrupts: impl Into<EnumSet<ParlIoTxInterrupt>>)

Listens for the given PARL_IO TX interrupt sources.

Source

pub fn unlisten(&self, interrupts: impl Into<EnumSet<ParlIoTxInterrupt>>)

Stops listening for the given PARL_IO TX interrupt sources.

Source

pub fn interrupts(&self) -> EnumSet<ParlIoTxInterrupt>

Returns the asserted PARL_IO TX interrupt sources.

Source

pub fn clear_interrupts( &self, interrupts: impl Into<EnumSet<ParlIoTxInterrupt>>, )

Clears the interrupt flags of the given PARL_IO TX interrupt sources.

Source

pub fn listen_dma(&self, interrupts: impl Into<EnumSet<DmaTxInterrupt>>)

Listens for the given DMA TX interrupt sources.

A handler must have been registered via ParlIoTx::set_dma_interrupt_handler before the transfer was started.

Source

pub fn unlisten_dma(&self, interrupts: impl Into<EnumSet<DmaTxInterrupt>>)

Stops listening for the given DMA TX interrupt sources.

Source

pub fn interrupts_dma(&self) -> EnumSet<DmaTxInterrupt>

Returns the asserted DMA TX interrupt sources.

Source

pub fn clear_interrupts_dma( &self, interrupts: impl Into<EnumSet<DmaTxInterrupt>>, )

Clears the given asserted DMA TX interrupt sources.

Trait Implementations§

Source§

impl<BUF: DmaTxBuffer, Dm: DriverMode> Deref for ParlIoTxTransfer<'_, BUF, Dm>

Available on crate feature unstable only.
Source§

type Target = <BUF as DmaTxBuffer>::View

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<BUF: DmaTxBuffer, Dm: DriverMode> DerefMut for ParlIoTxTransfer<'_, BUF, Dm>

Available on crate feature unstable only.
Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<BUF: DmaTxBuffer, Dm: DriverMode> Drop for ParlIoTxTransfer<'_, BUF, Dm>

Available on crate feature unstable only.
Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl<'d, BUF, Dm> !RefUnwindSafe for ParlIoTxTransfer<'d, BUF, Dm>

§

impl<'d, BUF, Dm> !UnwindSafe for ParlIoTxTransfer<'d, BUF, Dm>

§

impl<'d, BUF, Dm> Freeze for ParlIoTxTransfer<'d, BUF, Dm>
where ManuallyDrop<ParlIoTx<'d, Dm>>: Freeze, ManuallyDrop<<BUF as DmaTxBuffer>::View>: Freeze,

§

impl<'d, BUF, Dm> Send for ParlIoTxTransfer<'d, BUF, Dm>
where ManuallyDrop<ParlIoTx<'d, Dm>>: Send, ManuallyDrop<<BUF as DmaTxBuffer>::View>: Send,

§

impl<'d, BUF, Dm> Sync for ParlIoTxTransfer<'d, BUF, Dm>
where ManuallyDrop<ParlIoTx<'d, Dm>>: Sync, ManuallyDrop<<BUF as DmaTxBuffer>::View>: Sync,

§

impl<'d, BUF, Dm> Unpin for ParlIoTxTransfer<'d, BUF, Dm>
where ManuallyDrop<ParlIoTx<'d, Dm>>: Unpin, ManuallyDrop<<BUF as DmaTxBuffer>::View>: Unpin,

§

impl<'d, BUF, Dm> UnsafeUnpin for ParlIoTxTransfer<'d, BUF, Dm>
where ManuallyDrop<ParlIoTx<'d, Dm>>: UnsafeUnpin, ManuallyDrop<<BUF as DmaTxBuffer>::View>: 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
Source§

impl<T> CryptoRng for T
where T: DerefMut, <T as Deref>::Target: CryptoRng,

Source§

impl<R> CryptoRng for R
where R: TryCryptoRng<Error = !> + ?Sized,

§

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.

§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<R> Rng for R
where R: TryRng<Error = !> + ?Sized,

Source§

fn next_u32(&mut self) -> u32

Return the next random u32.
Source§

fn next_u64(&mut self) -> u64

Return the next random u64.
Source§

fn fill_bytes(&mut self, dst: &mut [u8])

Fill dest with random data. Read more
Source§

impl<T> RngCore for T
where T: DerefMut, <T as Deref>::Target: RngCore,

Source§

fn next_u32(&mut self) -> u32

Return the next random u32. Read more
Source§

fn next_u64(&mut self) -> u64

Return the next random u64. Read more
Source§

fn fill_bytes(&mut self, dst: &mut [u8])

Fill dest with random data. Read more
Source§

impl<R> RngCore for R
where R: Rng,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<R> TryCryptoRng for R
where R: CryptoRng + ?Sized,

Source§

impl<R> TryCryptoRng for R
where R: DerefMut, <R as Deref>::Target: TryCryptoRng,

§

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.
Source§

impl<R> TryRng for R
where R: DerefMut, <R as Deref>::Target: TryRng,

Source§

type Error = <<R as Deref>::Target as TryRng>::Error

The type returned in the event of a RNG error. Read more
Source§

fn try_next_u32(&mut self) -> Result<u32, <R as TryRng>::Error>

Return the next random u32.
Source§

fn try_next_u64(&mut self) -> Result<u64, <R as TryRng>::Error>

Return the next random u64.
Source§

fn try_fill_bytes(&mut self, dst: &mut [u8]) -> Result<(), <R as TryRng>::Error>

Fill dst entirely with random data.
Source§

impl<R> TryRngCore for R
where R: RngCore + ?Sized,

Source§

type Error = !

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

fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>

Return the next random u32.
Source§

fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>

Return the next random u64.
Source§

fn try_fill_bytes( &mut self, dst: &mut [u8], ) -> Result<(), <R as TryRngCore>::Error>

Fill dest entirely with random data.
Source§

fn unwrap_err(self) -> UnwrapErr<Self>
where Self: Sized,

Wrap RNG with the UnwrapErr wrapper.
Source§

fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>

Wrap RNG with the UnwrapMut wrapper.
Source§

impl<R> TryRngCore for R
where R: TryRng,

Source§

type Error = <R as TryRng>::Error

👎Deprecated since 0.10.0:

use TryRng instead

Error type.