pub(crate) fn program_chunk(&mut self, start: u32, data: &[u8]) -> Result<()> {
        let mut address_packet = vec![0u8; 4];
        address_packet[0..4].copy_from_slice(&start.to_le_bytes());

        let mut packet = Vec::with_capacity(data.len() + 4);
        packet.extend(address_packet);
        packet.extend(data);
        self.send_command(Command::Program, &packet, &mut [0; 0])
            .map(|_| ())
    }
/// Programs a single chunk of memory into flash, starting at the given address. The flash has
/// to be already erased for this operation to succeed. The maximum chunk size can be queried
/// with [`max_program_chunk_size`].
///
/// [`max_read_chunk_size`]: #method.max_program_chunk_size
Programs a single chunk of memory into flash, starting at the given address. The flash has
to be already erased for this operation to succeed. The maximum chunk size can be queried
with [`max_program_chunk_size`].


Programs a single chunk of memory into flash starting at the given address . The flash has to be already erased for this operation to succeed . The maximum chunk size can be queried with [ ` max_program_chunk_size ` ] .
pub(crate) fn program_chunk(&mut self, start: u32, data: &[u8]) -> Result<()> {
        let mut address_packet = vec![0u8; 4];
        address_packet[0..4].copy_from_slice(&start.to_le_bytes());
        let mut packet = Vec::with_capacity(data.len() + 4);
        packet.extend(address_packet);
        packet.extend(data);
        self.send_command(Command::Program, &packet, &mut [0; 0])
            .map(|_| ())
    }
pub ( crate ) fn program_chunk ( & mut self , start : u32 , data : & [ u8 ] ) -> Result < ( ) > { let mut address_packet = vec ! [ 0u8 4 ] ; address_packet [ 0 .. 4 ] . copy_from_slice ( & start . to_le_bytes ( ) ) ; let mut packet = Vec :: with_capacity ( data . len ( ) + 4 ) ; packet . extend ( address_packet ) ; packet . extend ( data ) ; self . send_command ( Command :: Program , & packet , & mut [ 0 ; 0 ] ) . map ( | _ | ( ) ) }
Programs a single chunk of memory into flash, starting at the given address.
Programs a single chunk of memory into flash starting at the given address .
&mut self
start
u32
data
&[u8]
&mut self
start
u32
data
&[u8]