Skip to content

Commit 9c3a57f

Browse files
committed
Add a few comments, update to use::super
1 parent bc658c1 commit 9c3a57f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/register/pmpcfgx.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/// Physical memory protection configuration
22
use bit_field::BitField;
33

4+
/// Permission enum contains all possible pmp register permission configurations
45
#[derive(Clone, Copy, Debug)]
56
pub enum Permission {
67
NONE = 0,
@@ -13,6 +14,7 @@ pub enum Permission {
1314
RWX = 7,
1415
}
1516

17+
/// Range enum contains all possible addressing modes for pmp registers
1618
#[derive(Clone, Copy, Debug)]
1719
pub enum Range {
1820
OFF = 0,
@@ -21,6 +23,7 @@ pub enum Range {
2123
NAPOT = 3,
2224
}
2325

26+
/// Pmpconfig struct to hold pmp register's current settings
2427
#[derive(Clone, Copy, Debug)]
2528
pub struct Pmpconfig {
2629
pub permission: Permission,
@@ -66,8 +69,7 @@ impl PmpByte {
6669
}
6770
}
6871
pub mod pmpcfg0 {
69-
use crate::register::{Permission, PmpByte, Pmpconfig, Range};
70-
use bit_field::BitField;
72+
use super::{PmpByte,Pmpconfig,Permission,Range,BitField};
7173

7274
#[derive(Clone, Copy, Debug)]
7375
pub struct Pmpcfg0 {

0 commit comments

Comments
 (0)