pub enum Error<E> {
Uart(E),
CrcMismatch,
InvalidSync,
InvalidMasterAddress,
AddressMismatch {
expected: u8,
actual: u8,
},
UnknownAddress(u8),
InvalidSlaveAddress(u8),
BufferTooSmall,
NoResponse,
}Expand description
Errors that can occur during TMC2209 communication.
Variants§
Uart(E)
UART communication error (read or write failed).
CrcMismatch
CRC checksum mismatch in received response.
InvalidSync
Invalid sync byte in response (expected 0x05).
InvalidMasterAddress
Invalid master address in response (expected 0xFF).
AddressMismatch
Register address in response doesn’t match request.
UnknownAddress(u8)
Unknown register address received.
InvalidSlaveAddress(u8)
Invalid slave address (must be 0-3).
BufferTooSmall
Response buffer too small.
NoResponse
No response received (timeout or no data).
Implementations§
Trait Implementations§
impl<E: Copy> Copy for Error<E>
impl<E: Eq> Eq for Error<E>
impl<E> StructuralPartialEq for Error<E>
Auto Trait Implementations§
impl<E> Freeze for Error<E>where
E: Freeze,
impl<E> RefUnwindSafe for Error<E>where
E: RefUnwindSafe,
impl<E> Send for Error<E>where
E: Send,
impl<E> Sync for Error<E>where
E: Sync,
impl<E> Unpin for Error<E>where
E: Unpin,
impl<E> UnwindSafe for Error<E>where
E: UnwindSafe,
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