aboutsummaryrefslogtreecommitdiff
path: root/src/peripheral/nvic.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/peripheral/nvic.rs')
-rw-r--r--src/peripheral/nvic.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/peripheral/nvic.rs b/src/peripheral/nvic.rs
new file mode 100644
index 0000000..4570c0f
--- /dev/null
+++ b/src/peripheral/nvic.rs
@@ -0,0 +1,25 @@
+//! Nested Vector Interrupt Controller
+
+use volatile_register::{RO, RW};
+
+/// Registers
+#[repr(C)]
+pub struct Registers {
+ /// Interrupt Set-Enable
+ pub iser: [RW<u32>; 16],
+ reserved0: [u32; 16],
+ /// Interrupt Clear-Enable
+ pub icer: [RW<u32>; 16],
+ reserved1: [u32; 16],
+ /// Interrupt Set-Pending
+ pub ispr: [RW<u32>; 16],
+ reserved2: [u32; 16],
+ /// Interrupt Clear-Pending
+ pub icpr: [RW<u32>; 16],
+ reserved3: [u32; 16],
+ /// Interrupt Active Bit
+ pub iabr: [RO<u32>; 16],
+ reserved4: [u32; 48],
+ /// Interrupt Priority
+ pub ipr: [RW<u32>; 124],
+}