#[repr(C)]pub struct CardStatus(/* private fields */);
Expand description
Represents the card status bits fields of the R6 response in SD mode.
Implementations§
Source§impl CardStatus
impl CardStatus
Sourcepub const fn bits(&self) -> u16
pub const fn bits(&self) -> u16
Gets the bit value for CardStatus.
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 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 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 = 2usize
pub const LEN: usize = 2usize
Represents the byte length 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>
Attempts to get the CurrentState field of the CardStatus.
Sourcepub fn set_current_state(&mut self, val: CurrentState)
pub fn set_current_state(&mut self, val: CurrentState)
Sets the CurrentState field of the CardStatus.
Sourcepub const fn try_from_bits(val: u16) -> Result<Self>
pub const fn try_from_bits(val: u16) -> Result<Self>
Attempts to convert a u16
into a CardStatus.
Sourcepub const fn bytes(&self) -> [u8; 2]
pub const fn bytes(&self) -> [u8; 2]
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