sdmmc_core/command/class/
class0.rs

1use crate::result::Error;
2use crate::{command_enum, lib_enum};
3
4pub mod cmd0;
5pub mod cmd1;
6pub mod cmd2;
7pub mod cmd3;
8pub mod cmd4;
9pub mod cmd6;
10pub mod cmd7;
11pub mod cmd8;
12pub mod cmd9;
13
14pub mod cmd10;
15pub mod cmd11;
16pub mod cmd12;
17pub mod cmd13;
18pub mod cmd14;
19pub mod cmd15;
20
21lib_enum! {
22    /// MMC opcodes for Class 0.
23    CommandClass0: u32 {
24        default: GoIdleState,
25        error: Error,
26        GoIdleState = 0,
27        SendOpCond = 1,
28        AllSendCID = 2,
29        SetRelativeAddress = 3,
30        SetDSR = 4,
31        Switch = 6,
32        SelectCard = 7,
33        SendIFCond = 8,
34        SendCSD = 9,
35        SendCID = 10,
36        VoltageSwitch = 11,
37        StopTransmission = 12,
38        SendStatus = 13,
39        BustestR = 14,
40        GoInactiveState = 15,
41    }
42}
43
44command_enum! {
45    /// Represents the variants for Class0 commands.
46    Command {
47        default: Cmd0(cmd0::Cmd0),
48        Cmd0(cmd0::Cmd0),
49        Cmd1(cmd1::Cmd1),
50        Cmd2(cmd2::Cmd2),
51        Cmd3(cmd3::Cmd3),
52        Cmd4(cmd4::Cmd4),
53        Cmd6(cmd6::Cmd6),
54        Cmd7(cmd7::Cmd7),
55        Cmd8(cmd8::Cmd8),
56        Cmd9(cmd9::Cmd9),
57        Cmd10(cmd10::Cmd10),
58        Cmd11(cmd11::Cmd11),
59        Cmd12(cmd12::Cmd12),
60        Cmd13(cmd13::Cmd13),
61        Cmd14(cmd14::Cmd14),
62        Cmd15(cmd15::Cmd15),
63    }
64}