4
0
Эх сурвалжийг харах

Fix get_range method on Pmpbyte

dkhayes117 3 жил өмнө
parent
commit
f1fa0752f0

+ 1 - 1
src/register/pmpcfgx.rs

@@ -40,7 +40,7 @@ impl PmpByte {
 
 
     #[inline]
     #[inline]
     pub fn get_range(&self) -> Option<Range> {
     pub fn get_range(&self) -> Option<Range> {
-        match self.byte.get_bits(4..=5) {
+        match self.byte.get_bits(3..=4) {
             0 => Some(Range::OFF),
             0 => Some(Range::OFF),
             1 => Some(Range::TOR),
             1 => Some(Range::TOR),
             2 => Some(Range::NA4),
             2 => Some(Range::NA4),