pub enum Error {
Timeout(ErrorContext),
Crc(ErrorContext),
NoCard,
UnsupportedCommand,
BadResponse(ErrorContext),
CardError(CardError),
WriteError(ErrorContext),
ReadError(ErrorContext),
Misaligned,
InvalidArgument,
CardLocked,
BusError(ErrorContext),
}Expand description
Errors returned by SD/MMC protocol parsers and drivers.
Recoverable bus / protocol variants carry an ErrorContext pinpointing
the phase and (when known) command index that raised them. Caller-facing
programming errors (Misaligned, InvalidArgument) and card-state
reports (NoCard, CardError, CardLocked) do not.
Variants§
Timeout(ErrorContext)
No response from card within the deadline for the wrapped phase.
Crc(ErrorContext)
CRC check failed during the wrapped phase.
NoCard
Card is not responding or not inserted.
UnsupportedCommand
Command index is not supported on this transport.
BadResponse(ErrorContext)
Bad response received during the wrapped phase.
CardError(CardError)
Card returned an error in its R1 response.
WriteError(ErrorContext)
Write operation failed during the wrapped phase.
ReadError(ErrorContext)
Read operation failed during the wrapped phase.
Misaligned
Misaligned address or length passed by the caller.
InvalidArgument
Caller passed an invalid argument.
CardLocked
Card is locked (host needs to unlock before further I/O).
BusError(ErrorContext)
Generic communication error on the bus during the wrapped phase.