aboutsummaryrefslogtreecommitdiff
path: root/src/peripheral/test.rs
diff options
context:
space:
mode:
authorGravatar bors[bot] <bors[bot]@users.noreply.github.com> 2018-05-11 17:58:13 +0000
committerGravatar bors[bot] <bors[bot]@users.noreply.github.com> 2018-05-11 17:58:13 +0000
commite3217ad94d6c941796c2d7ee8735e7b250a69387 (patch)
tree6488e7d0ad3910d30077f3fdd7eee553b1839f27 /src/peripheral/test.rs
parent00d6faae149c062e79a822b8d46b6b5e7e972f57 (diff)
parent05bbc3b815703a0654d2e37966547e392f856161 (diff)
downloadcortex-m-e3217ad94d6c941796c2d7ee8735e7b250a69387.tar.gz
cortex-m-e3217ad94d6c941796c2d7ee8735e7b250a69387.tar.zst
cortex-m-e3217ad94d6c941796c2d7ee8735e7b250a69387.zip
Merge #88
88: make compilable on stable r=japaric a=japaric This PR makes this crate compilable on stable when the "inline-asm" and "singleton" Cargo features are disabled (they are enabled by default to maintain backwards compatibility). The main change has been replacing almost (\*) all inline `asm!` invocations with FFI calls into external assembly files. (\*) Stuff that has not been converted into external assembly file and thus is not available on stable: - Reading the (A)PSR register (I'm not sure if this will work with the extra function call overhead) - Reading and writing the Link Register (LR) - Reading and writing the Program Counter (PC) I would appreciate if someone checked that all the stuff that's now using FFI calls has the same semantics as the inline `asm!` version. Co-authored-by: Jorge Aparicio <jorge@japaric.io>
Diffstat (limited to 'src/peripheral/test.rs')
-rw-r--r--src/peripheral/test.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/peripheral/test.rs b/src/peripheral/test.rs
index 39f7de5..cc3e292 100644
--- a/src/peripheral/test.rs
+++ b/src/peripheral/test.rs
@@ -121,11 +121,11 @@ fn scb() {
assert_eq!(address(&scb.scr), 0xE000_ED10);
assert_eq!(address(&scb.ccr), 0xE000_ED14);
assert_eq!(address(&scb.shpr), 0xE000_ED18);
- assert_eq!(address(&scb.shpcrs), 0xE000_ED24);
+ assert_eq!(address(&scb.shcrs), 0xE000_ED24);
assert_eq!(address(&scb.cfsr), 0xE000_ED28);
assert_eq!(address(&scb.hfsr), 0xE000_ED2C);
assert_eq!(address(&scb.dfsr), 0xE000_ED30);
- assert_eq!(address(&scb.mmar), 0xE000_ED34);
+ assert_eq!(address(&scb.mmfar), 0xE000_ED34);
assert_eq!(address(&scb.bfar), 0xE000_ED38);
assert_eq!(address(&scb.afsr), 0xE000_ED3C);
assert_eq!(address(&scb.cpacr), 0xE000_ED88);