pub enum AnyUsbError {
Show 18 variants
EP0Stalled,
EP0NotEmptyAfterSetup,
EPWriteError,
EPReadError,
EPStalled,
EPReadFailed,
EP0BadGetStatusSize,
EP0BadGetConfigSize,
DataConversion,
SetAddressFailed,
InvalidDescriptorLength,
InvalidDescriptorType,
InvalidStringLength,
UsbDeviceBuilder(BuilderError),
UserDefined1,
UserDefined2,
UserDefinedU64(u64),
UserDefinedString(String),
}
Expand description
Possible errors or other abnormal conditions.
Variants§
EP0Stalled
EP Stalled after Setup packet. Not necessarily an error, the Device rejected EP transaction. Next request should clear Stall for EP0.
EP0NotEmptyAfterSetup
EP0 buffer is not empty after Setup packet was consumed.
EPWriteError
Can’t get how many bytes were written. Usually, this is some internal error.
EPReadError
Can’t get how many bytes were read. Usually, this is some internal error.
EPStalled
EP Stalled. Not necessarily an error, the Device rejected EP transaction.
EPReadFailed
Error while reading from the endpoint. No data or data limit reached. Usually, this is some internal error.
EP0BadGetStatusSize
Bad reply length for GET_STATUS control request. Length should be 2. Usually, this is some internal error.
EP0BadGetConfigSize
Bad reply length for GET_CONFIGURATION control request. Length should be 1. Usually, this is some internal error.
DataConversion
Failed to convert one data representation to another, e.g. with TryInto. Usually, this is some internal error.
SetAddressFailed
SET_ADDRESS didn’t work during Device setup. Usually, this is some internal error.
InvalidDescriptorLength
Descriptor length is larger than the size of data returned.
InvalidDescriptorType
Unexpected Descriptor type.
InvalidStringLength
String Descriptor length is odd.
UsbDeviceBuilder(BuilderError)
Wrapper for BuilderError
of usb-device
when UsbDeviceBuilder
fails.
UserDefined1
User-defined meaning. Enum value is passed through, not used by the library.
UserDefined2
User-defined meaning Enum value is passed through, not used by the library.
UserDefinedU64(u64)
User-defined meaning Enum value is passed through, not used by the library.
UserDefinedString(String)
User-defined meaning Enum value is passed through, not used by the library.