pub struct SdCid {
cid: [u32; 4],
}
impl SdCid {
pub fn new(cid: [u32; 4]) -> Self {
Self { cid }
}
}
pub struct SdCsd {
csd: [u32; 4],
}
impl SdCsd {
pub fn new(csd: [u32; 4]) -> Self {
Self { csd }
}
}
pub struct SdOcr {
pub ocr: u32,
}
impl SdOcr {
#[inline]
pub fn get_voltage_window(&self) -> u32 {
self.ocr & 0xFF_FFFF
}
#[inline]
pub fn is_busy(&self) -> bool {
(self.ocr & (1 << 31)) == 0
}
#[inline]
pub fn s18a(&self) -> bool {
(self.ocr & (1 << 24)) > 0
}
#[inline]
pub fn co2t(&self) -> bool {
(self.ocr & (1 << 27)) > 0
}
#[inline]
pub fn uhs2(&self) -> bool {
(self.ocr & (1 << 29)) > 0
}
#[inline]
pub fn ccs(&self) -> bool {
(self.ocr & (1 << 30)) > 0
}
}
pub struct SdCic {
pub supports_1p2v: bool,
pub supports_pcie: bool,
}