pub unsafe fn new<M1, M2>(
        mmio_base: usize,
        capability: &Capability<M2>,
        mapper: M1,
    ) -> accessor::Array<Self, M1>
    where
        M1: Mapper,
        M2: Mapper + Clone,
    {
        let base = mmio_base + usize::from(capability.caplength.read().get()) + 0x400;
        accessor::Array::new(
            base,
            capability.hcsparams1.read().number_of_ports().into(),
            mapper,
        )
    }
/// Creates a new accessor to the array of the Port Register Set.
///
/// # Safety
///
/// Caller must ensure that only one accessor is created, otherwise it may cause undefined
/// behavior such as data race.
///
/// # Panics
///
/// This method panics if the base address of the Port Register Sets is not aligned correctly.
Creates a new accessor to the array of the Port Register Set.
Creates a new accessor to the array of the Port Register Set .
pub unsafe fn new<M1, M2>(
        mmio_base: usize,
        capability: &Capability<M2>,
        mapper: M1,
    ) -> accessor::Array<Self, M1>
    where
        M1: Mapper,
        M2: Mapper + Clone,
    {
        let base = mmio_base + usize::from(capability.caplength.read().get()) + 0x400;
        accessor::Array::new(
            base,
            capability.hcsparams1.read().number_of_ports().into(),
            mapper,
        )
    }
pub unsafe fn new < M1 , M2 > ( mmio_base : usize , capability : & Capability < M2 > , mapper : M1 , ) -> accessor :: Array < Self , M1 > where M1 : Mapper , M2 : Mapper + Clone , { let base = mmio_base + usize :: from ( capability . caplength . read ( ) . get ( ) ) + 0x400 ; accessor :: Array :: new ( base , capability . hcsparams1 . read ( ) . number_of_ports ( ) . into ( ) , mapper , ) }
Creates a new accessor to the array of the Port Register Set.
Creates a new accessor to the array of the Port Register Set .
mmio_base
usize
capability
&Capability<M2>
mapper
M1
mmio_base
usize
capability
&Capability<M2>
mapper
M1
safety
Caller must ensure that only one accessor is created, otherwise it may cause undefined
behavior such as data race.
Caller must ensure that only one accessor is created otherwise it may cause undefined behavior such as data race .
panics
This method panics if the base address of the Port Register Sets is not aligned correctly.
This method panics if the base address of the Port Register Sets is not aligned correctly .