Skip to main content

Module error

Module error 

Source
Expand description

Error types for the ATECC608B driver.

Each layer maps its specific failure modes to a variant of AteccError. The error type is generic over the HAL error so callers can match on the exact reason without losing typing information.

Upper layers (the firmware HID dispatcher, the host CLI) often need to distinguish categories of failure (chip-side vs. communication-side) without naming the concrete HalError type. AteccErrorKind is the non-generic projection of AteccError intended for that use: it carries the same shape information (which variant fired) but no HAL payload, so it can travel through generic-erased layers and be serialized as a single u8 for transport over the USB-HID protocol.

Enums§

AteccError
Error returned by every public method of crate::Atecc.
AteccErrorKind
Non-generic projection of AteccError.
ChipError
Errors reported by the chip itself via a 4-byte response frame.

Constants§

ATECC_ERR_SUB_BAD_CRC
Stable wire-format sub-code for the bad-CRC variant.
ATECC_ERR_SUB_BUFFER_TOO_SMALL
Stable wire-format sub-code for the buffer-too-small variant.
ATECC_ERR_SUB_HAL
Stable wire-format sub-code for the HAL-error variant.
ATECC_ERR_SUB_MALFORMED_RESPONSE
Stable wire-format sub-code for the malformed-response variant.
ATECC_ERR_SUB_SELF_TEST_FAILURE
Stable wire-format sub-code for the self-test-failure variant.
ATECC_ERR_SUB_TIMEOUT
Stable wire-format sub-code for the timeout variant.
ATECC_ERR_SUB_WAKE_FAILED
Stable wire-format sub-code for the wake-failed variant.