Skip to content

Commit 3951582

Browse files
rewrite FPU constants to match ARM doc structure better
1 parent 1256e30 commit 3951582

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/peripheral/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,9 +443,9 @@ pub enum FpuAccessMode {
443443
Privileged,
444444
}
445445

446-
const SCB_CPACR_FPU_MASK: u32 = 0x00f00000;
447-
const SCB_CPACR_FPU_ENABLE: u32 = 0x00500000;
448-
const SCB_CPACR_FPU_USER: u32 = 0x00a00000;
446+
const SCB_CPACR_FPU_MASK: u32 = 0b11_11 << 20;
447+
const SCB_CPACR_FPU_ENABLE: u32 = 0b01_01 << 20;
448+
const SCB_CPACR_FPU_USER: u32 = 0b10_10 << 20;
449449

450450
impl Scb {
451451
/// Gets FPU access mode

0 commit comments

Comments
 (0)