#[non_exhaustive]pub enum ErrorKind {
Bus,
ArbitrationLoss,
NoAcknowledge(NoAcknowledgeSource),
Overrun,
Other,
}
Expand description
I2C error kind.
This represents a common set of I2C operation errors. HAL implementations are free to define more specific or additional error types. However, by providing a mapping to these common I2C errors, generic code can still react to them.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Bus
Bus error occurred. e.g. A START or a STOP condition is detected and is not located after a multiple of 9 SCL clock pulses.
ArbitrationLoss
The arbitration was lost, e.g. electrical problems with the clock signal.
NoAcknowledge(NoAcknowledgeSource)
A bus operation was not acknowledged, e.g. due to the addressed device not being available on the bus or the device not being ready to process requests at the moment.
Overrun
The peripheral receive buffer was overrun.
Other
A different error occurred. The original error may contain more information.
Trait Implementations§
Source§impl Ord for ErrorKind
impl Ord for ErrorKind
Source§impl PartialOrd for ErrorKind
impl PartialOrd for ErrorKind
impl Copy for ErrorKind
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Bus
: 0 bytesArbitrationLoss
: 0 bytesNoAcknowledge
: 1 byteOverrun
: 0 bytesOther
: 0 bytes