Skip to content

Commit da13bee

Browse files
committed
Rename BIT_TRCENA to DCB_DEMCR_TRCENA, replace 0x01 with 1
1 parent 385b3eb commit da13bee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/peripheral/dcb.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use volatile_register::{RW, WO};
44

55
use peripheral::DCB;
66

7-
const BIT_TRCENA: u32 = 0x01 << 24;
7+
const DCB_DEMCR_TRCENA: u32 = 1 << 24;
88

99
/// Register block
1010
#[repr(C)]
@@ -26,12 +26,12 @@ impl DCB {
2626
/// soft-reset, only on power reset.
2727
pub fn enable_trace(&mut self) {
2828
// set bit 24 / TRCENA
29-
unsafe { self.demcr.modify(|w| w | BIT_TRCENA); }
29+
unsafe { self.demcr.modify(|w| w | DCB_DEMCR_TRCENA); }
3030
}
3131

3232
/// Disables TRACE. See `DCB::enable_trace()` for more details
3333
pub fn disable_trace(&mut self) {
3434
// unset bit 24 / TRCENA
35-
unsafe { self.demcr.modify(|w| w & !BIT_TRCENA); }
35+
unsafe { self.demcr.modify(|w| w & !DCB_DEMCR_TRCENA); }
3636
}
3737
}

0 commit comments

Comments
 (0)