pub fn component_class(&mut self) -> Result<CSComponentClass, RomTableError> {
        #![allow(clippy::verbose_bit_mask)]
        let mut data = [0u32; 4];
        let mut probe = self.probe.borrow_mut();

        probe.read_block32(self.base_address as u32 + 0xFF0, &mut data)?;

        debug!("CIDR: {:x?}", data);

        if data[0] & 0xFF == 0x0D
            && data[1] & 0x0F == 0x00
            && data[2] & 0xFF == 0x05
            && data[3] & 0xFF == 0xB1
        {
            FromPrimitive::from_u32((data[1] >> 4) & 0x0F)
                .ok_or(RomTableError::CSComponentIdentificationError)
        } else {
            error!("The CIDR registers did not contain the expected preambles.");
            Err(RomTableError::CSComponentIdentificationError)
        }
    }
/// Reads the component class from a component info table.
Reads the component class from a component info table.
Reads the component class from a component info table .
pub fn component_class(&mut self) -> Result<CSComponentClass, RomTableError> {
        #![allow(clippy::verbose_bit_mask)]
        let mut data = [0u32; 4];
        let mut probe = self.probe.borrow_mut();
        probe.read_block32(self.base_address as u32 + 0xFF0, &mut data)?;
        debug!("CIDR: {:x?}", data);
        if data[0] & 0xFF == 0x0D
            && data[1] & 0x0F == 0x00
            && data[2] & 0xFF == 0x05
            && data[3] & 0xFF == 0xB1
        {
            FromPrimitive::from_u32((data[1] >> 4) & 0x0F)
                .ok_or(RomTableError::CSComponentIdentificationError)
        } else {
            error!("The CIDR registers did not contain the expected preambles.");
            Err(RomTableError::CSComponentIdentificationError)
        }
    }
pub fn component_class ( & mut self ) -> Result < CSComponentClass , RomTableError > { # ! [ allow ( clippy verbose_bit_mask ) ] let mut data = [ 0u32 ; 4 ] ; let mut probe = self . probe . borrow_mut ( ) ; probe . read_block32 ( self . base_address as u32 + 0xFF0 , & mut data ) ? ; debug ! ( " " data ) ; if data [ 0 ] & 0xFF == 0x0D && data [ 1 ] & 0x0F == 0x00 && data [ 2 ] & 0xFF == 0x05 && data [ 3 ] & 0xFF == 0xB1 { FromPrimitive :: from_u32 ( ( data [ 1 ] >> 4 ) & 0x0F ) . ok_or ( RomTableError :: CSComponentIdentificationError ) } else { error ! ( " " ) ; Err ( RomTableError :: CSComponentIdentificationError ) } }
Reads the component class from a component info table.
Reads the component class from a component info table .
&mut self