Skip to main content

RISCV_CFG

Struct RISCV_CFG 

Source
pub struct RISCV_CFG { /* private fields */ }
Expand description

RISC-V System Configuration

Implementations§

Source§

impl RISCV_CFG

Source

pub const PTR: *const RegisterBlock

Pointer to the register block

Source

pub const fn ptr() -> *const RegisterBlock

Return the pointer to the register block

Source

pub unsafe fn steal() -> Self

Steal an instance of this peripheral

§Safety

Ensure that the new instance of the peripheral cannot be used in a way that may race with any existing instances, for example by only accessing read-only or write-only registers, or by consuming the original peripheral and using critical sections to coordinate access between multiple new instances.

Additionally, other software such as HALs may rely on only one peripheral instance existing to ensure memory safety; ensure no stolen instances are passed to such software.

Methods from Deref<Target = RegisterBlock>§

Source

pub fn riscv_sta_add0(&self) -> &RISCV_STA_ADD0

0x04 - RISCV Start Address0 Register

Source

pub fn riscv_sta_add1(&self) -> &RISCV_STA_ADD1

0x08 - RISCV Start Address1 Register

Source

pub fn rf1p_cfg(&self) -> &RF1P_CFG

0x10 - RF1P Configuration Register

Source

pub fn rom_cfg(&self) -> &ROM_CFG

0x1c - ROM Configuration Register

Source

pub fn wakeup_en(&self) -> &WAKEUP_EN

0x20 - Wakeup Enable Register

Source

pub fn wakeup_mask(&self, n: usize) -> &WAKEUP_MASK

0x24..0x38 - Wakeup Mask Register

Source

pub fn ts_tmode_sel(&self) -> &TS_TMODE_SEL

0x40 - Timestamp Test Mode Select Register

Source

pub fn sram_addr_twist(&self) -> &SRAM_ADDR_TWIST

0x44 - SRAM Address Twist Register

Source

pub fn work_mode(&self) -> &WORK_MODE

0x48 - Work Mode Register

Source

pub fn retite_pc0(&self) -> &RETITE_PC0

0x50 - Retire PC0 Register

Source

pub fn retite_pc1(&self) -> &RETITE_PC1

0x54 - Retire PC1 Register

Source

pub fn irq_mode(&self, n: usize) -> &IRQ_MODE

0x60..0x74 - IRQ Mode Register

Source

pub fn riscv_axi_pmu_ctrl(&self) -> &RISCV_AXI_PMU_CTRL

0x104 - RISCV AXI PMU Control Register

Source

pub fn riscv_axi_pmu_prd(&self) -> &RISCV_AXI_PMU_PRD

0x108 - RISCV AXI PMU Period Register

Source

pub fn riscv_axi_pmu_lat_rd(&self) -> &RISCV_AXI_PMU_LAT_RD

0x10c - RISCV AXI PMU Read Latency Register

Source

pub fn riscv_axi_pmu_lat_wr(&self) -> &RISCV_AXI_PMU_LAT_WR

0x110 - RISCV AXI PMU Write Latency Register

Source

pub fn riscv_axi_pmu_req_rd(&self) -> &RISCV_AXI_PMU_REQ_RD

0x114 - RISCV AXI PMU Read Request Register

Source

pub fn riscv_axi_pmu_req_wr(&self) -> &RISCV_AXI_PMU_REQ_WR

0x118 - RISCV AXI PMU Write Request Register

Source

pub fn riscv_axi_pmu_bw_rd(&self) -> &RISCV_AXI_PMU_BW_RD

0x11c - RISCV AXI PMU Read Bandwidth Register

Source

pub fn riscv_axi_pmu_bw_wr(&self) -> &RISCV_AXI_PMU_BW_WR

0x120 - RISCV AXI PMU Write Bandwidth Register

Trait Implementations§

Source§

impl Debug for RISCV_CFG

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for RISCV_CFG

Source§

type Target = RegisterBlock

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Send for RISCV_CFG

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.