1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#[derive(Debug, Default)]
pub(crate) struct SdStatus {
// Current bus width
bus_width: u8, // Note: Fixed typo in field name from "witdh" to "width"
// Secured mode status
secure_mode: u8,
// SD card type
card_type: u16,
// Size of protected area
protected_size: u32,
// Speed class of card
speed_class: u8,
// Performance of move indicated by 1[MB/S] step
performance_move: u8,
// Size of allocation unit (AU)
au_size: u8,
// Number of AUs to be erased at a time
erase_size: u16,
// Timeout value for erasing areas specified by UNIT OF ERASE AU
erase_timeout: u8,
// Fixed offset value added to erase time
erase_offset: u8,
// Speed grade for UHS mode
uhs_speed_grade: u8,
// Size of allocation unit (AU) for UHS mode
uhs_au_size: u8,
}
impl SdStatus {
pub fn new() -> Self {
SdStatus {
bus_width: 0,
secure_mode: 0,
card_type: 0,
protected_size: 0,
speed_class: 0,
performance_move: 0,
au_size: 0,
erase_size: 0,
erase_timeout: 0,
erase_offset: 0,
uhs_speed_grade: 0,
uhs_au_size: 0,
}
}
}