pub fn send_data<D>(&mut self, data: &D) -> io::Result<bool>
    where
        D: AsRef<[u8]>,
    {
        assert!(data.as_ref().len() <= constants::MAX_BYTES_PER_TRANSFER);

        self.write_cmd(constants::CMD_SEND_DATA, data)?;
        self.read_ack()
    }
/// Send data to be written into the flash memory.
///
/// The return value represents if the command was
/// acknowledged or not, if not acknowledged the write address
/// is not incrmeneted by the device which allows for retransmissions
/// of the previous data.
///
/// # Note
///
/// This only does work after a [`Device::download`] command
/// has been issued.
///
/// After issuing this command, [`Device::get_status`] command
/// _should_ be used to check for errors.
///
/// # Panics
///
/// This function will panic if the `data` length in bytes is
/// higher than [`constants::MAX_BYTES_PER_TRANSFER`].
Send data to be written into the flash memory.
The return value represents if the command was
acknowledged or not, if not acknowledged the write address
is not incrmeneted by the device which allows for retransmissions
of the previous data.
Send data to be written into the flash memory . The return value represents if the command was acknowledged or not if not acknowledged the write address is not incrmeneted by the device which allows for retransmissions of the previous data .
pub fn send_data<D>(&mut self, data: &D) -> io::Result<bool>
    where
        D: AsRef<[u8]>,
    {
        assert!(data.as_ref().len() <= constants::MAX_BYTES_PER_TRANSFER);
        self.write_cmd(constants::CMD_SEND_DATA, data)?;
        self.read_ack()
    }
pub fn send_data < D > ( & mut self , data : & D ) -> io :: Result < bool > where D : AsRef < [ u8 ] > , { assert ! ( data as_ref ( ) len ( ) constants MAX_BYTES_PER_TRANSFER ) ; self . write_cmd ( constants :: CMD_SEND_DATA , data ) ? ; self . read_ack ( ) }
Send data to be written into the flash memory.
Send data to be written into the flash memory .
&mut self
data
&D
&mut self
data
&D
note
This only does work after a [`Device::download`] command
has been issued.

After issuing this command, [`Device::get_status`] command
_should_ be used to check for errors.
This only does work after a [ ` Device :: download ` ] command has been issued . After issuing this command [ ` Device :: get_status ` ] command _should_ be used to check for errors .
panics
This function will panic if the `data` length in bytes is
higher than [`constants::MAX_BYTES_PER_TRANSFER`].
This function will panic if the ` data ` length in bytes is higher than [ ` constants :: MAX_BYTES_PER_TRANSFER ` ] .