pub struct SwitchStatus {
pub raw: [u8; 64],
}Expand description
64-byte SD function-switch status, returned in the data phase of CMD6.
See SD Physical Layer spec section 4.3.10 (Switch Function). Field
numbering uses the spec’s bit-435..=0 convention but accessors here are
expressed in byte offsets within raw[0..64] for clarity.
Fields§
§raw: [u8; 64]Implementations§
Source§impl SwitchStatus
impl SwitchStatus
pub fn from_raw(raw: [u8; 64]) -> Self
Sourcepub fn selected_function(&self, group: u8) -> u8
pub fn selected_function(&self, group: u8) -> u8
Selected function for group (1-based, 1..=6) after a switch
operation. 0xF means the group is not supported by the card.
Group 1 selection lives in the low nibble of byte 16; group 2 in the high nibble of the same byte; group 3 in the low nibble of byte 15; and so on, paired big-endian over bytes 14..=16.
Sourcepub fn high_speed_active(&self) -> bool
pub fn high_speed_active(&self) -> bool
Returns true iff group 1 reports high-speed (function 1) selected.
Sourcepub fn access_mode_supported(&self, function: u8) -> bool
pub fn access_mode_supported(&self, function: u8) -> bool
Returns true iff SD access-mode group 1 advertises function.
The support bitmap for group 1 is carried in byte 13 in the 64-byte
switch status block; bit n means function n is selectable.
Trait Implementations§
Source§impl Clone for SwitchStatus
impl Clone for SwitchStatus
Source§fn clone(&self) -> SwitchStatus
fn clone(&self) -> SwitchStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more