pub enum AteccError<HalError>where
HalError: Debug,{
Hal(HalError),
WakeFailed,
SelfTestFailure,
BadCrc,
Chip(ChipError),
Timeout,
MalformedResponse,
BufferTooSmall,
}Expand description
Error returned by every public method of crate::Atecc.
Variants§
Hal(HalError)
The HAL itself reported an error (I2C bus, GPIO, etc).
WakeFailed
The wake response did not match 04 11 33 43. The chip is either
unpowered, miswired, or in self-test failure mode.
SelfTestFailure
The chip returned the self-test-failure pattern 04 07 C4 40 after
wake. Hardware is unusable until power-cycle.
BadCrc
CRC-16 of a received frame did not match. The frame is discarded. The caller may retry.
Chip(ChipError)
The chip returned a 4-byte status frame indicating an error.
Timeout
Polling for a command response exceeded the watchdog window (~1.3 s nominal, 2.5 s upper bound).
MalformedResponse
A received frame has an inconsistent length byte.
BufferTooSmall
A caller-supplied buffer is too small for the response.
Implementations§
Source§impl<HalError> AteccError<HalError>where
HalError: Debug,
impl<HalError> AteccError<HalError>where
HalError: Debug,
Sourcepub fn kind(&self) -> AteccErrorKind
pub fn kind(&self) -> AteccErrorKind
Project this error onto its non-generic AteccErrorKind.
Useful for layers that must report the error over a wire format
without leaking the concrete HalError type. The returned value
preserves the variant identity and, for AteccError::Chip, the
inner ChipError.