#[repr(C)]pub struct CardStatus(/* private fields */);
Expand description
Represents the card status returned in a R1
response.
Implementations§
Source§impl CardStatus
impl CardStatus
Sourcepub const fn bits(&self) -> u32
pub const fn bits(&self) -> u32
Gets the bit value for CardStatus.
Sourcepub const fn out_of_range(&self) -> bool
pub const fn out_of_range(&self) -> bool
Getter for out_of_range field of CardStatus.
Command argument not allowed for this card.
Sourcepub fn set_out_of_range(&mut self, val: bool)
pub fn set_out_of_range(&mut self, val: bool)
Setter for out_of_range field of CardStatus.
Command argument not allowed for this card.
Sourcepub const fn address_error(&self) -> bool
pub const fn address_error(&self) -> bool
Getter for address_error field of CardStatus.
Error with a misaligned address.
Sourcepub fn set_address_error(&mut self, val: bool)
pub fn set_address_error(&mut self, val: bool)
Setter for address_error field of CardStatus.
Error with a misaligned address.
Sourcepub const fn block_len_error(&self) -> bool
pub const fn block_len_error(&self) -> bool
Getter for block_len_error field of CardStatus.
Error with the block length specified by the command.
Sourcepub fn set_block_len_error(&mut self, val: bool)
pub fn set_block_len_error(&mut self, val: bool)
Setter for block_len_error field of CardStatus.
Error with the block length specified by the command.
Sourcepub const fn erase_seq_error(&self) -> bool
pub const fn erase_seq_error(&self) -> bool
Getter for erase_seq_error field of CardStatus.
Error in the erase sequence commands.
Sourcepub fn set_erase_seq_error(&mut self, val: bool)
pub fn set_erase_seq_error(&mut self, val: bool)
Setter for erase_seq_error field of CardStatus.
Error in the erase sequence commands.
Sourcepub const fn erase_param(&self) -> bool
pub const fn erase_param(&self) -> bool
Getter for erase_param field of CardStatus.
Invalid block selection for erase occurred.
Sourcepub fn set_erase_param(&mut self, val: bool)
pub fn set_erase_param(&mut self, val: bool)
Setter for erase_param field of CardStatus.
Invalid block selection for erase occurred.
Sourcepub const fn wp_violation(&self) -> bool
pub const fn wp_violation(&self) -> bool
Getter for wp_violation field of CardStatus.
Attempted to write to a write-protected card.
Sourcepub fn set_wp_violation(&mut self, val: bool)
pub fn set_wp_violation(&mut self, val: bool)
Setter for wp_violation field of CardStatus.
Attempted to write to a write-protected card.
Sourcepub const fn card_is_locked(&self) -> bool
pub const fn card_is_locked(&self) -> bool
Getter for card_is_locked field of CardStatus.
Card is locked by the host.
Sourcepub fn set_card_is_locked(&mut self, val: bool)
pub fn set_card_is_locked(&mut self, val: bool)
Setter for card_is_locked field of CardStatus.
Card is locked by the host.
Sourcepub const fn lock_unlock_failed(&self) -> bool
pub const fn lock_unlock_failed(&self) -> bool
Getter for lock_unlock_failed field of CardStatus.
Error detected when trying to lock/unlock the card.
Sourcepub fn set_lock_unlock_failed(&mut self, val: bool)
pub fn set_lock_unlock_failed(&mut self, val: bool)
Setter for lock_unlock_failed field of CardStatus.
Error detected when trying to lock/unlock the card.
Sourcepub const fn crc_error(&self) -> bool
pub const fn crc_error(&self) -> bool
Getter for crc_error field of CardStatus.
The CRC check of the previous command failed.
Sourcepub fn set_crc_error(&mut self, val: bool)
pub fn set_crc_error(&mut self, val: bool)
Setter for crc_error field of CardStatus.
The CRC check of the previous command failed.
Sourcepub const fn illegal_command(&self) -> bool
pub const fn illegal_command(&self) -> bool
Getter for illegal_command field of CardStatus.
Command not legal for the card state.
Sourcepub fn set_illegal_command(&mut self, val: bool)
pub fn set_illegal_command(&mut self, val: bool)
Setter for illegal_command field of CardStatus.
Command not legal for the card state.
Sourcepub const fn card_ecc_error(&self) -> bool
pub const fn card_ecc_error(&self) -> bool
Getter for card_ecc_error field of CardStatus.
ECC failed to correct a data error.
Sourcepub fn set_card_ecc_error(&mut self, val: bool)
pub fn set_card_ecc_error(&mut self, val: bool)
Setter for card_ecc_error field of CardStatus.
ECC failed to correct a data error.
Sourcepub const fn cc_error(&self) -> bool
pub const fn cc_error(&self) -> bool
Getter for cc_error field of CardStatus.
Internal card controller error.
Sourcepub fn set_cc_error(&mut self, val: bool)
pub fn set_cc_error(&mut self, val: bool)
Setter for cc_error field of CardStatus.
Internal card controller error.
Sourcepub const fn error(&self) -> bool
pub const fn error(&self) -> bool
Getter for error field of CardStatus.
A general or an unknown error occurred.
Sourcepub fn set_error(&mut self, val: bool)
pub fn set_error(&mut self, val: bool)
Setter for error field of CardStatus.
A general or an unknown error occurred.
Sourcepub const fn csd_overwrite(&self) -> bool
pub const fn csd_overwrite(&self) -> bool
Getter for csd_overwrite field of CardStatus.
Either read-only section of the CSD mismatched, or write-protect bit switch attempted.
Sourcepub fn set_csd_overwrite(&mut self, val: bool)
pub fn set_csd_overwrite(&mut self, val: bool)
Setter for csd_overwrite field of CardStatus.
Either read-only section of the CSD mismatched, or write-protect bit switch attempted.
Sourcepub const fn wp_erase_skip(&self) -> bool
pub const fn wp_erase_skip(&self) -> bool
Getter for wp_erase_skip field of CardStatus.
Set when partial address space erased because of write-protected blocks.
Sourcepub fn set_wp_erase_skip(&mut self, val: bool)
pub fn set_wp_erase_skip(&mut self, val: bool)
Setter for wp_erase_skip field of CardStatus.
Set when partial address space erased because of write-protected blocks.
Sourcepub const fn card_ecc_disabled(&self) -> bool
pub const fn card_ecc_disabled(&self) -> bool
Getter for card_ecc_disabled field of CardStatus.
Command executed without using the internal card ECC.
Sourcepub fn set_card_ecc_disabled(&mut self, val: bool)
pub fn set_card_ecc_disabled(&mut self, val: bool)
Setter for card_ecc_disabled field of CardStatus.
Command executed without using the internal card ECC.
Sourcepub const fn erase_reset(&self) -> bool
pub const fn erase_reset(&self) -> bool
Getter for erase_reset field of CardStatus.
An erase sequence was cleared before executing because an out of sequence command received.
Sourcepub fn set_erase_reset(&mut self, val: bool)
pub fn set_erase_reset(&mut self, val: bool)
Setter for erase_reset field of CardStatus.
An erase sequence was cleared before executing because an out of sequence command received.
Sourcepub const fn ready_for_data(&self) -> bool
pub const fn ready_for_data(&self) -> bool
Getter for ready_for_data field of CardStatus.
Corresponds to buffer empty signaling on the bus.
Sourcepub fn set_ready_for_data(&mut self, val: bool)
pub fn set_ready_for_data(&mut self, val: bool)
Setter for ready_for_data field of CardStatus.
Corresponds to buffer empty signaling on the bus.
Sourcepub const fn fx_event(&self) -> bool
pub const fn fx_event(&self) -> bool
Getter for fx_event field of CardStatus.
Extension Functions may set this bit to get host to deal with events.
Sourcepub fn set_fx_event(&mut self, val: bool)
pub fn set_fx_event(&mut self, val: bool)
Setter for fx_event field of CardStatus.
Extension Functions may set this bit to get host to deal with events.
Sourcepub const fn app_cmd(&self) -> bool
pub const fn app_cmd(&self) -> bool
Getter for app_cmd field of CardStatus.
The card will expect an ACMD
, or the command has been interpreted as ACMD
.
Sourcepub fn set_app_cmd(&mut self, val: bool)
pub fn set_app_cmd(&mut self, val: bool)
Setter for app_cmd field of CardStatus.
The card will expect an ACMD
, or the command has been interpreted as ACMD
.
Sourcepub const fn ake_seq_error(&self) -> bool
pub const fn ake_seq_error(&self) -> bool
Getter for ake_seq_error field of CardStatus.
Error in the sequence of the authentication process.
Sourcepub fn set_ake_seq_error(&mut self, val: bool)
pub fn set_ake_seq_error(&mut self, val: bool)
Setter for ake_seq_error field of CardStatus.
Error in the sequence of the authentication process.
Source§impl CardStatus
impl CardStatus
Sourcepub const LEN: usize = 4usize
pub const LEN: usize = 4usize
Represents the byte length of the CardStatus.
Sourcepub const DEFAULT: u32 = 0u32
pub const DEFAULT: u32 = 0u32
Represents the default value of the CardStatus.
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new CardStatus.
Sourcepub const fn current_state(&self) -> Result<CurrentState>
pub const fn current_state(&self) -> Result<CurrentState>
Gets the CurrentState field for the CardStatus.
Sourcepub fn set_current_state(&mut self, val: CurrentState)
pub fn set_current_state(&mut self, val: CurrentState)
Sets the CurrentState field for the CardStatus.
Sourcepub const fn try_from_bits(val: u32) -> Result<Self>
pub const fn try_from_bits(val: u32) -> Result<Self>
Attempts to convert a u32
into a CardStatus.
Sourcepub const fn bytes(&self) -> [u8; 4]
pub const fn bytes(&self) -> [u8; 4]
Converts the CardStatus into a byte array.
Sourcepub const fn try_from_bytes(val: &[u8]) -> Result<Self>
pub const fn try_from_bytes(val: &[u8]) -> Result<Self>
Attempts to convert a byte slice into a CardStatus.
Trait Implementations§
Source§impl Clone for CardStatus
impl Clone for CardStatus
Source§fn clone(&self) -> CardStatus
fn clone(&self) -> CardStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more