pub unsafe fn new(base: usize, mapper: M) -> Self {
        let header: Single<Header, M> = Single::new(base, mapper.clone());
        let len = header.read().protocol_speed_id_count();
        let psis = if len > 0 {
            Some(Array::new(base + 0x10, len.into(), mapper))
        } else {
            None
        };

        Self { header, psis }
    }
/// Creates an accessor to xHCI Supported Protocol Capability.
///
/// # Safety
///
/// `base` must be the correct address to xHCI Supported Protocol Capability.
///
/// # Panics
///
/// This method panics if `base` is not aligned correctly.
Creates an accessor to xHCI Supported Protocol Capability.
Creates an accessor to xHCI Supported Protocol Capability .
pub unsafe fn new(base: usize, mapper: M) -> Self {
        let header: Single<Header, M> = Single::new(base, mapper.clone());
        let len = header.read().protocol_speed_id_count();
        let psis = if len > 0 {
            Some(Array::new(base + 0x10, len.into(), mapper))
        } else {
            None
        };
        Self { header, psis }
    }
pub unsafe fn new ( base : usize , mapper : M ) -> Self { let header : Single < Header , M > = Single :: new ( base , mapper . clone ( ) ) ; let len = header . read ( ) . protocol_speed_id_count ( ) ; let psis = if len > 0 { Some ( Array :: new ( base + 0x10 , len . into ( ) , mapper ) ) } else { None } ; Self { header , psis } }
Creates an accessor to xHCI Supported Protocol Capability.
Creates an accessor to xHCI Supported Protocol Capability .
base
usize
mapper
M
base
usize
mapper
M
safety
`base` must be the correct address to xHCI Supported Protocol Capability.
` base ` must be the correct address to xHCI Supported Protocol Capability .
panics
This method panics if `base` is not aligned correctly.
This method panics if ` base ` is not aligned correctly .