#[non_exhaustive]pub enum Error {
Abort(u32),
InvalidReadBufferLength,
InvalidWriteBufferLength,
AddressOutOfRange(u16),
AddressReserved(u16),
}Expand description
I2C error
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Abort(u32)
I2C abort with error
InvalidReadBufferLength
User passed in a read buffer that was 0 length
This is a limitation of the rp235x I2C peripheral. If the slave ACKs its address, the I2C peripheral must read at least one byte before sending the STOP condition.
InvalidWriteBufferLength
User passed in a write buffer that was 0 length
This is a limitation of the rp235x I2C peripheral. If the slave ACKs its address, the I2C peripheral must write at least one byte before sending the STOP condition.
AddressOutOfRange(u16)
Target i2c address is out of range
AddressReserved(u16)
Target i2c address is reserved
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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
Mutably borrows from an owned value. Read more
Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more