Skip to main content

write_lock_error

Function write_lock_error 

Source
fn write_lock_error<HalError>(
    tx_buf: &mut [u8],
    err: &CryptoServiceError<HalError>,
) -> usize
where HalError: Debug,
Expand description

Map a service error to a response status, with a lock-specific bias: the chip’s “execution error” during a lock command almost always means the CRC fed by the host did not match the chip’s recomputed CRC. Surface that as the dedicated LockCrcMismatch status to make triage trivial on the host side.