Skip to main content

TransferError

Enum TransferError 

Source
pub enum TransferError {
    Stall,
    TransactionError,
    Babble,
    Nak,
    NakTimeout,
    FrameOverrun,
    DataToggleError,
    Halted,
    Timeout,
}
Available on non-crate feature bcm2712 only.
Expand description

Why a single-packet channel transfer didn’t complete successfully.

Variants§

§

Stall

The device returned STALL — it doesn’t support/recognize the request.

§

TransactionError

HCINT.TXERR — a transaction error (no response, bad CRC, etc.).

§

Babble

HCINT.BBERR — babble (the device sent more than expected).

§

Nak

The device NAK’d this attempt — normal USB flow control (“not ready yet, ask again”), not a real error. Left for the caller to retry; see crate::usb::control’s retry wrapper.

§

NakTimeout

A caller-level retry budget was exhausted while the device kept NAKing — distinct from a single Self::Nak.

§

FrameOverrun

HCINT.FRMOR — frame overrun. A periodic (interrupt or isochronous) transaction was still in progress when the microframe it was scheduled in ran out, and the core abandoned it.

This is about when the transaction was started, not about the device: a periodic transfer armed late in a microframe has too little of it left to finish. Retrying on the next interval is the normal response, which is why callers should treat this much as they treat Self::Nak rather than as a hard failure.

§

DataToggleError

HCINT.DTERR — the packet arrived carrying the opposite data toggle to the one expected, so it was discarded as a retransmission of one already received. Means host and device have lost toggle synchronisation.

§

Halted

The channel halted (HCINT.CHH) without HCINT.XFRC (transfer complete) and without any specific error/status bit set — an unexplained halt. Not expected in normal operation now that completion is detected via CHH; a defensive branch rather than a condition seen in practice.

§

Timeout

The channel never halted (HCINT.CHH never set) within this driver’s timeout — the transaction appears stuck rather than having reached any terminal condition.

Trait Implementations§

Source§

impl Clone for TransferError

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for TransferError

Source§

impl Debug for TransferError

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for TransferError

Source§

impl From<TransferError> for EnumerationError

Source§

fn from(error: TransferError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for TransferError

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TransferError

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.