sdmmc_core/command/class/
class2.rs

1use crate::result::Error;
2use crate::{command_enum, lib_enum};
3
4pub mod cmd16;
5pub mod cmd17;
6pub mod cmd18;
7pub mod cmd19;
8pub mod cmd20;
9pub mod cmd21;
10pub mod cmd22;
11pub mod cmd23;
12
13lib_enum! {
14    /// MMC opcodes for Class 2.
15    CommandClass2: u32 {
16        default: SetBlocklen,
17        error: Error,
18        SetBlocklen = 16,
19        ReadSingleBlock = 17,
20        ReadMultipleBlock = 18,
21        SendTuningBlock = 19,
22        SpeedClassControl = 20,
23        SendTuningBlockHS200 = 21,
24        AddressExtension = 22,
25        SetBlockCount = 23,
26    }
27}
28
29command_enum! {
30    /// Represents the variants for Class2 commands.
31    Command {
32        default: Cmd16(cmd16::Cmd16),
33        Cmd16(cmd16::Cmd16),
34        Cmd17(cmd17::Cmd17),
35        Cmd18(cmd18::Cmd18),
36        Cmd19(cmd19::Cmd19),
37        Cmd20(cmd20::Cmd20),
38        Cmd21(cmd21::Cmd21),
39        Cmd22(cmd22::Cmd22),
40        Cmd23(cmd23::Cmd23),
41    }
42}