fn write_command_bytes(&self, offset: usize, buf: &[u8]) {
        // TODO: ensure we don't write past available pages

        let mut i = 0;
        while (i + 3) < buf.len() {
            self.write_pram(
                (offset + i) >> 2,
                &[buf[i], buf[i + 1], buf[i + 2], buf[i + 3]],
            );
            i += 4;
        }

        while i < buf.len() {
            self.write_command_byte(offset + i, buf[i]);
            i += 1;
        }
    }
/// Writes command bytes from `CSE_PRAM` from a 32-bit aligned offset.
/// Ported verbatim from reference code.
Writes command bytes from `CSE_PRAM` from a 32-bit aligned offset.
Ported verbatim from reference code.
Writes command bytes from ` CSE_PRAM ` from a 32 - bit aligned offset . Ported verbatim from reference code .
fn write_command_bytes(&self, offset: usize, buf: &[u8]) {
        // TODO: ensure we don't write past available pages
        let mut i = 0;
        while (i + 3) < buf.len() {
            self.write_pram(
                (offset + i) >> 2,
                &[buf[i], buf[i + 1], buf[i + 2], buf[i + 3]],
            );
            i += 4;
        }
        while i < buf.len() {
            self.write_command_byte(offset + i, buf[i]);
            i += 1;
        }
    }
fn write_command_bytes ( & self , offset : usize , buf : & [ u8 ] ) { // TODO: ensure we don't write past available pages let mut i = 0 ; while ( i + 3 ) < buf . len ( ) { self . write_pram ( ( offset + i ) >> 2 , & [ buf [ i ] , buf [ i + 1 ] , buf [ i + 2 ] , buf [ i + 3 ] ] , ) ; i += 4 ; } while i < buf . len ( ) { self . write_command_byte ( offset + i , buf [ i ] ) ; i += 1 ; } }
Writes command bytes from `CSE_PRAM` from a 32-bit aligned offset.
Writes command bytes from ` CSE_PRAM ` from a 32 - bit aligned offset .
&self
offset
usize
buf
&[u8]