We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02a0916 commit d6a828eCopy full SHA for d6a828e
src/register/pmpcfgx.rs
@@ -55,7 +55,7 @@ pub mod pmpcfg0 {
55
56
#[inline]
57
fn range(&self, byte: usize) -> Range {
58
- match byte.get_bits(3..5) {
+ match byte.get_bits(4..6) {
59
0 => Range::OFF,
60
1 => Range::TOR,
61
2 => Range::NA4,
@@ -66,7 +66,7 @@ pub mod pmpcfg0 {
66
67
68
fn permission(&self, byte: usize) -> Permission {
69
+ match byte.get_bits(0..4) {
70
0 => Permission::NONE,
71
1 => Permission::R,
72
2 => Permission::W,
@@ -122,7 +122,7 @@ pub mod pmpcfg0 {
122
123
pub unsafe fn clear_lock(index: usize) {
124
assert!(index < 8);
125
- _set(1 << (7 + (index * 8)));
+ _clear(1 << (7 + (index * 8)));
126
}
127
128
0 commit comments