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

        let mut i = 0;
        while (i + 3) < buf.len() {
            let page = self.read_pram((offset + i) >> 2);

            buf[i] = page[0];
            buf[i + 1] = page[1];
            buf[i + 2] = page[2];
            buf[i + 3] = page[3];
            i += 4;
        }

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