pub struct Command {
pub index: u8,
pub argument: u32,
pub options: HardwareOptions,
pub kind: CommandKind,
pub rsp_type: ResponseType,
pub rsp_crc: bool,
pub buffer: Option<FixedVec<u8>>,
}Expand description
Parameters for building a command to be sent to the card.
The command format must follow the SD specification and is sent on the CMD line.
It is 48-bit in length, containing a 6-bit command index and 32-bit argument.
Besides that it includes 7-bit CRC and start, transmission and end bit.
The command structure is the same for SD memory, SDIO and MMC (?), but the content can be very different. Therefore the content of the commands is decided here in the kernel service, while the platform driver has the low-level implementation for how to physically send the necessary bits to the card.
Fields§
§index: u8The numeric value of the command
argument: u32The argument value for the command
options: HardwareOptionsHardware specific configuration that should be applied
kind: CommandKindThe type of command
rsp_type: ResponseTypeThe expected type of the response
rsp_crc: boolWhether the response CRC needs to be checked
buffer: Option<FixedVec<u8>>Optional buffer for incoming or outgoing data