Skip to main content

Command

Trait Command 

Source
pub trait Command {
    // Required methods
    fn command_type(&self) -> CommandType;
    fn response_type(&self) -> ResponseType;
    fn argument(&self) -> u32;
    fn set_argument(&mut self, arg: u32);
    fn crc(&self) -> u8;
    fn set_crc(&mut self, crc: u8);
}
Expand description

Represents common functionality for SD/MMC command types.

Required Methods§

Source

fn command_type(&self) -> CommandType

Gets the SD/MMC command type.

Source

fn response_type(&self) -> ResponseType

Gets the SD/MMC response type expected for the command.

Source

fn argument(&self) -> u32

Gets the SD/MMC command argument.

§Note

Returns 0 for commands that do not expect an argument.

Source

fn set_argument(&mut self, arg: u32)

Gets the SD/MMC command argument.

§Note

No effect for commands that do not expect an argument.

Source

fn crc(&self) -> u8

Gets the CRC-7 of the command.

Source

fn set_crc(&mut self, crc: u8)

Sets the CRC-7 of the command.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§