pub fn run_command(&self, command: Command) -> Result<(), Error> {
        match command {
            //TODO verify this list of commands
            Command::WriteEnable
            | Command::WriteDisable
            | Command::Reset
            | Command::EnableReset => (),
            _ => return Err(Error::CommandFunctionMismatch),
        }

        let tfm = TransferMode {
            instruction_enable: true,
            ..TransferMode::default()
        };
        unsafe {
            self.run_read_instruction(command, tfm, 0, &mut [], true);
        }
        Ok(())
    }
/// Run a generic command that neither takes nor receives data
Run a generic command that neither takes nor receives data
Run a generic command that neither takes nor receives data
pub fn run_command(&self, command: Command) -> Result<(), Error> {
        match command {
            //TODO verify this list of commands
            Command::WriteEnable
            | Command::WriteDisable
            | Command::Reset
            | Command::EnableReset => (),
            _ => return Err(Error::CommandFunctionMismatch),
        }
        let tfm = TransferMode {
            instruction_enable: true,
            ..TransferMode::default()
        };
        unsafe {
            self.run_read_instruction(command, tfm, 0, &mut [], true);
        }
        Ok(())
    }
pub fn run_command ( & self , command : Command ) -> Result < ( ) , Error > { match command { //TODO verify this list of commands Command :: WriteEnable | Command :: WriteDisable | Command :: Reset | Command :: EnableReset => ( ) , _ => return Err ( Error :: CommandFunctionMismatch ) , } let tfm = TransferMode { instruction_enable : true , .. TransferMode :: default ( ) } ; unsafe { self . run_read_instruction ( command , tfm , 0 , & mut [ ] , true ) ; } Ok ( ( ) ) }
Run a generic command that neither takes nor receives data
Run a generic command that neither takes nor receives data
&self
command
Command
&self
command
Command