pub fn write_command(&self, command: Command, data: &[u8]) -> Result<(), Error> {
        match command {
            //TODO verify this list of commands
            Command::PageProgram
            | Command::QuadPageProgram
            | Command::WriteStatus
            | Command::WriteStatus2 => (),
            _ => return Err(Error::CommandFunctionMismatch),
        }

        let tfm = TransferMode {
            data_enable: !data.is_empty(),
            instruction_enable: true,
            ..TransferMode::default()
        };
        unsafe {
            self.run_write_instruction(command, tfm, 0, data);
        }
        Ok(())
    }
/// Run one of the write commands
Run one of the write commands
Run one of the write commands
pub fn write_command(&self, command: Command, data: &[u8]) -> Result<(), Error> {
        match command {
            //TODO verify this list of commands
            Command::PageProgram
            | Command::QuadPageProgram
            | Command::WriteStatus
            | Command::WriteStatus2 => (),
            _ => return Err(Error::CommandFunctionMismatch),
        }
        let tfm = TransferMode {
            data_enable: !data.is_empty(),
            instruction_enable: true,
            ..TransferMode::default()
        };
        unsafe {
            self.run_write_instruction(command, tfm, 0, data);
        }
        Ok(())
    }
pub fn write_command ( & self , command : Command , data : & [ u8 ] ) -> Result < ( ) , Error > { match command { //TODO verify this list of commands Command :: PageProgram | Command :: QuadPageProgram | Command :: WriteStatus | Command :: WriteStatus2 => ( ) , _ => return Err ( Error :: CommandFunctionMismatch ) , } let tfm = TransferMode { data_enable : ! data . is_empty ( ) , instruction_enable : true , .. TransferMode :: default ( ) } ; unsafe { self . run_write_instruction ( command , tfm , 0 , data ) ; } Ok ( ( ) ) }
Run one of the write commands
Run one of the write commands
&self
command
Command
data
&[u8]
&self
command
Command
data
&[u8]