pub unsafe fn new(mmio_base: usize, mapper: &M) -> Self
    where
        M: Mapper,
    {
        macro_rules! m {
            ($offset:expr) => {
                accessor::Single::new(mmio_base + $offset, mapper.clone())
            };
        }

        Self {
            caplength: m!(0x00),
            hciversion: m!(0x02),
            hcsparams1: m!(0x04),
            hcsparams2: m!(0x08),
            hcsparams3: m!(0x0c),
            hccparams1: m!(0x10),
            dboff: m!(0x14),
            rtsoff: m!(0x18),
            hccparams2: m!(0x1c),
            vtiosoff: m!(0x20),
        }
    }
/// Creates a new accessor to the Host Controller Capability Registers.
///
/// # Safety
///
/// The caller must ensure that the Host Controller Capability Registers are accessed only
/// through this struct.
///
/// # Panics
///
/// This method panics if `mmio_base` is not aligned correctly.
Creates a new accessor to the Host Controller Capability Registers.
Creates a new accessor to the Host Controller Capability Registers .
pub unsafe fn new(mmio_base: usize, mapper: &M) -> Self
    where
        M: Mapper,
    {
        macro_rules! m {
            ($offset:expr) => {
                accessor::Single::new(mmio_base + $offset, mapper.clone())
            };
        }
        Self {
            caplength: m!(0x00),
            hciversion: m!(0x02),
            hcsparams1: m!(0x04),
            hcsparams2: m!(0x08),
            hcsparams3: m!(0x0c),
            hccparams1: m!(0x10),
            dboff: m!(0x14),
            rtsoff: m!(0x18),
            hccparams2: m!(0x1c),
            vtiosoff: m!(0x20),
        }
    }
pub unsafe fn new ( mmio_base : usize , mapper : & M ) -> Self where M : Mapper , { macro_rules! m { ( $offset : expr ) => { accessor Single new ( mmio_base $offset mapper clone ( ) ) } ; } Self { caplength : m ! ( 0x00 ) , hciversion : m ! ( 0x02 ) , hcsparams1 : m ! ( 0x04 ) , hcsparams2 : m ! ( 0x08 ) , hcsparams3 : m ! ( 0x0c ) , hccparams1 : m ! ( 0x10 ) , dboff : m ! ( 0x14 ) , rtsoff : m ! ( 0x18 ) , hccparams2 : m ! ( 0x1c ) , vtiosoff : m ! ( 0x20 ) , } }
Creates a new accessor to the Host Controller Capability Registers.
Creates a new accessor to the Host Controller Capability Registers .
mmio_base
usize
mapper
&M
mmio_base
usize
mapper
&M
safety
The caller must ensure that the Host Controller Capability Registers are accessed only
through this struct.
The caller must ensure that the Host Controller Capability Registers are accessed only through this struct .
panics
This method panics if `mmio_base` is not aligned correctly.
This method panics if ` mmio_base ` is not aligned correctly .