#[repr(C)]pub struct CardStatus(/* private fields */);
Expand description
Represents the card status field of the R6 response in SDIO 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.
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 from_bits(val: u16) -> Self
pub const fn from_bits(val: u16) -> Self
Converts 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