diff options
author | 2017-12-09 10:03:39 +0000 | |
---|---|---|
committer | 2017-12-09 10:03:39 +0000 | |
commit | ce5bee6e37b4127040224523a1af85c275401a18 (patch) | |
tree | bc6033773fa2c8959d6de6d8b673902141f17c84 /src/peripheral/dcb.rs | |
parent | 7e05e189c5195303f8693d442b71754f956fc81f (diff) | |
parent | 0b45ea4bd486565da5d78793dcb4718afb4f4387 (diff) | |
download | cortex-m-ce5bee6e37b4127040224523a1af85c275401a18.tar.gz cortex-m-ce5bee6e37b4127040224523a1af85c275401a18.tar.zst cortex-m-ce5bee6e37b4127040224523a1af85c275401a18.zip |
Auto merge of #65 - japaric:singletons, r=japaric
turn peripherals into scoped singletons
See this RFC for details: japaric/svd2rust#157
Diffstat (limited to 'src/peripheral/dcb.rs')
-rw-r--r-- | src/peripheral/dcb.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/peripheral/dcb.rs b/src/peripheral/dcb.rs new file mode 100644 index 0000000..02ec901 --- /dev/null +++ b/src/peripheral/dcb.rs @@ -0,0 +1,16 @@ +//! Debug Control Block + +use volatile_register::{RW, WO}; + +/// Register block +#[repr(C)] +pub struct RegisterBlock { + /// Debug Halting Control and Status + pub dhcsr: RW<u32>, + /// Debug Core Register Selector + pub dcrsr: WO<u32>, + /// Debug Core Register Data + pub dcrdr: RW<u32>, + /// Debug Exception and Monitor Control + pub demcr: RW<u32>, +} |