fn write_command_halfword(&self, offset: usize, halfword: u16) {
        let mut page = u32::from_be_bytes(self.read_pram(offset >> 2));
        if (offset & 2) != 0 {
            page &= !LOWER_HALF_MASK;
            page |= ((halfword as u32) << LOWER_HALF_SHIFT) & LOWER_HALF_MASK;
        } else {
            page &= !UPPER_HALF_MASK;
            page |= ((halfword as u32) << LOWER_HALF_SHIFT) & UPPER_HALF_MASK;
        }

        let newpage = u8_be_array_from_u32(page);
        self.write_pram(offset >> 2, &newpage);
    }
/// Writes a command half word to `CSE_PRAM` at a 16-bit aligned offset.
/// Ported verbatim from reference code.
Writes a command half word to `CSE_PRAM` at a 16-bit aligned offset.
Ported verbatim from reference code.
Writes a command half word to ` CSE_PRAM ` at a 16 - bit aligned offset . Ported verbatim from reference code .
fn write_command_halfword(&self, offset: usize, halfword: u16) {
        let mut page = u32::from_be_bytes(self.read_pram(offset >> 2));
        if (offset & 2) != 0 {
            page &= !LOWER_HALF_MASK;
            page |= ((halfword as u32) << LOWER_HALF_SHIFT) & LOWER_HALF_MASK;
        } else {
            page &= !UPPER_HALF_MASK;
            page |= ((halfword as u32) << LOWER_HALF_SHIFT) & UPPER_HALF_MASK;
        }
        let newpage = u8_be_array_from_u32(page);
        self.write_pram(offset >> 2, &newpage);
    }
fn write_command_halfword ( & self , offset : usize , halfword : u16 ) { let mut page = u32 :: from_be_bytes ( self . read_pram ( offset >> 2 ) ) ; if ( offset & 2 ) != 0 { page &= ! LOWER_HALF_MASK ; page |= ( ( halfword as u32 ) << LOWER_HALF_SHIFT ) & LOWER_HALF_MASK ; } else { page &= ! UPPER_HALF_MASK ; page |= ( ( halfword as u32 ) << LOWER_HALF_SHIFT ) & UPPER_HALF_MASK ; } let newpage = u8_be_array_from_u32 ( page ) ; self . write_pram ( offset >> 2 , & newpage ) ; }
Writes a command half word to `CSE_PRAM` at a 16-bit aligned offset.
Writes a command half word to ` CSE_PRAM ` at a 16 - bit aligned offset .
&self
offset
usize
halfword
u16