#[repr(u8)]pub enum ResponseStatus {
Show 17 variants
Ok = 0,
InvalidCommand = 1,
InvalidPayload = 2,
InvalidSlot = 3,
AteccCommunicationError = 4,
AteccChipError = 5,
TouchTimeout = 6,
NotProvisioned = 7,
LockMagicMismatch = 8,
LockCrcMismatch = 9,
Busy = 10,
WrongPin = 11,
PinRequired = 12,
PinBlocked = 13,
WrongPuk = 14,
Bricked = 15,
EmergencyResetNotPermitted = 16,
}Expand description
First byte of every HID response.
Variants§
Ok = 0
0x00 - Operation succeeded. Payload depends on the originating
command (e.g. 64-byte pubkey for GetPubkey, 64-byte signature for
Sign, empty for VerifyPin).
InvalidCommand = 1
0x01 - Command opcode unknown.
InvalidPayload = 2
0x02 - Payload size or shape is invalid.
InvalidSlot = 3
0x03 - Slot index out of range.
AteccCommunicationError = 4
0x04 - I2C / wake / framing error talking to the ATECC.
payload[0] is a one-byte sub-code identifying the precise
failure category (HAL nack, wake-failed, CRC mismatch, timeout,
malformed response, buffer-too-small, self-test failure). The
canonical encoding matches atecc608b::AteccErrorKind::as_sub_code.
AteccChipError = 5
0x05 - Chip returned an error status. The chip’s raw status byte
is in payload[0]. Decode via
atecc608b::ChipError::from_status_byte to get the symbolic
variant (ParseError, ExecutionError, etc.).
TouchTimeout = 6
0x06 - The user did not press the button within the 30 s window.
NotProvisioned = 7
0x07 - Token has not been provisioned yet.
LockMagicMismatch = 8
0x08 - Magic word for a Lock* command did not match.
LockCrcMismatch = 9
0x09 - CRC of the expected config does not match what’s on chip.
Busy = 10
0x0A - Another operation is in progress.
WrongPin = 11
0x0B - PIN was wrong. Tries remaining in payload[0].
PinRequired = 12
0x0C - A PIN session is required before signing.
PinBlocked = 13
0x0D - PIN slot is blocked. Only PUK unblock can recover.
WrongPuk = 14
0x0E - PUK was wrong. Tries remaining in payload[0].
Bricked = 15
0x0F - PUK retries exhausted. Chip is bricked.
EmergencyResetNotPermitted = 16
0x10 - EmergencyReset was requested but the user still has
PIN or PUK attempts remaining. Payload is 2 bytes:
[pin_tries_remaining, puk_tries_remaining].
Implementations§
Trait Implementations§
Source§impl Clone for ResponseStatus
impl Clone for ResponseStatus
Source§fn clone(&self) -> ResponseStatus
fn clone(&self) -> ResponseStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more