d1_pac/
plic.rs

1#[doc = r"Register block"]
2#[repr(C)]
3pub struct RegisterBlock {
4    prio: [PRIO; 256],
5    _reserved1: [u8; 0x0c00],
6    ip: [IP; 9],
7    _reserved2: [u8; 0x0fdc],
8    mie: [MIE; 9],
9    _reserved3: [u8; 0x5c],
10    sie: [SIE; 9],
11    _reserved4: [u8; 0x001f_df58],
12    ctrl: CTRL,
13    mth: MTH,
14    mclaim: MCLAIM,
15    _reserved7: [u8; 0x0ff8],
16    sth: STH,
17    sclaim: SCLAIM,
18}
19impl RegisterBlock {
20    #[doc = "0x00..0x400 - Interrupt Priority Register"]
21    #[inline(always)]
22    pub const fn prio(&self, n: usize) -> &PRIO {
23        &self.prio[n]
24    }
25    #[doc = "0x1000..0x1024 - Interrupt Pending Register"]
26    #[inline(always)]
27    pub const fn ip(&self, n: usize) -> &IP {
28        &self.ip[n]
29    }
30    #[doc = "0x2000..0x2024 - Machine Mode Interrupt Enable Register"]
31    #[inline(always)]
32    pub const fn mie(&self, n: usize) -> &MIE {
33        &self.mie[n]
34    }
35    #[doc = "0x2080..0x20a4 - Supervisor Mode Interrupt Enable Register"]
36    #[inline(always)]
37    pub const fn sie(&self, n: usize) -> &SIE {
38        &self.sie[n]
39    }
40    #[doc = "0x1ffffc - Control Register"]
41    #[inline(always)]
42    pub const fn ctrl(&self) -> &CTRL {
43        &self.ctrl
44    }
45    #[doc = "0x200000 - Machine Mode Priority Threshold Register"]
46    #[inline(always)]
47    pub const fn mth(&self) -> &MTH {
48        &self.mth
49    }
50    #[doc = "0x200004 - Machine Mode Claim/Complete Register"]
51    #[inline(always)]
52    pub const fn mclaim(&self) -> &MCLAIM {
53        &self.mclaim
54    }
55    #[doc = "0x201000 - Supervisor Mode Priority Threshold Register"]
56    #[inline(always)]
57    pub const fn sth(&self) -> &STH {
58        &self.sth
59    }
60    #[doc = "0x201004 - Supervisor Mode Claim/Complete Register"]
61    #[inline(always)]
62    pub const fn sclaim(&self) -> &SCLAIM {
63        &self.sclaim
64    }
65}
66#[doc = "prio (rw) register accessor: Interrupt Priority Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`prio::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`prio::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@prio`] module"]
67pub type PRIO = crate::Reg<prio::PRIO_SPEC>;
68#[doc = "Interrupt Priority Register"]
69pub mod prio;
70#[doc = "ip (rw) register accessor: Interrupt Pending Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ip::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`ip::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ip`] module"]
71pub type IP = crate::Reg<ip::IP_SPEC>;
72#[doc = "Interrupt Pending Register"]
73pub mod ip;
74#[doc = "mie (rw) register accessor: Machine Mode Interrupt Enable Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`mie::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`mie::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@mie`] module"]
75pub type MIE = crate::Reg<mie::MIE_SPEC>;
76#[doc = "Machine Mode Interrupt Enable Register"]
77pub mod mie;
78#[doc = "sie (rw) register accessor: Supervisor Mode Interrupt Enable Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`sie::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`sie::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sie`] module"]
79pub type SIE = crate::Reg<sie::SIE_SPEC>;
80#[doc = "Supervisor Mode Interrupt Enable Register"]
81pub mod sie;
82#[doc = "ctrl (rw) register accessor: Control Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ctrl::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`ctrl::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ctrl`] module"]
83pub type CTRL = crate::Reg<ctrl::CTRL_SPEC>;
84#[doc = "Control Register"]
85pub mod ctrl;
86#[doc = "mth (rw) register accessor: Machine Mode Priority Threshold Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`mth::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`mth::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@mth`] module"]
87pub type MTH = crate::Reg<mth::MTH_SPEC>;
88#[doc = "Machine Mode Priority Threshold Register"]
89pub mod mth;
90#[doc = "mclaim (rw) register accessor: Machine Mode Claim/Complete Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`mclaim::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`mclaim::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@mclaim`] module"]
91pub type MCLAIM = crate::Reg<mclaim::MCLAIM_SPEC>;
92#[doc = "Machine Mode Claim/Complete Register"]
93pub mod mclaim;
94#[doc = "sth (rw) register accessor: Supervisor Mode Priority Threshold Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`sth::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`sth::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sth`] module"]
95pub type STH = crate::Reg<sth::STH_SPEC>;
96#[doc = "Supervisor Mode Priority Threshold Register"]
97pub mod sth;
98#[doc = "sclaim (rw) register accessor: Supervisor Mode Claim/Complete Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`sclaim::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`sclaim::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sclaim`] module"]
99pub type SCLAIM = crate::Reg<sclaim::SCLAIM_SPEC>;
100#[doc = "Supervisor Mode Claim/Complete Register"]
101pub mod sclaim;