fn write_lock_error<HalError>(
tx_buf: &mut [u8],
err: &CryptoServiceError<HalError>,
) -> usizewhere
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.