Skip to content

Commit 96aa359

Browse files
committed
Include all types in the macros
1 parent 7229509 commit 96aa359

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/register/macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,10 @@ macro_rules! read_composite_csr {
272272
}
273273

274274
macro_rules! set_pmp {
275-
{$range:ty, $permission:ty} => {
275+
() => {
276276
/// Set the pmp configuration corresponding to the index
277277
#[inline]
278-
pub unsafe fn set_pmp(index: usize, range: $range, permission: $permission, locked: bool) {
278+
pub unsafe fn set_pmp(index: usize, range: Range, permission: Permission, locked: bool) {
279279
#[cfg(riscv32)]
280280
assert!(index < 4);
281281

src/register/pmpcfgx.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub mod pmpcfg0 {
8686
read_csr_as!(Pmpcsr, 0x3A0, __read_pmpcfg0);
8787
write_csr_as_usize!(0x3A0, __write_pmpcfg0);
8888

89-
set_pmp!(Range,Permission);
89+
set_pmp!();
9090
clear_pmp!();
9191
}
9292

@@ -100,7 +100,7 @@ pub mod pmpcfg1 {
100100
read_csr_as!(Pmpcsr, 0x3A1, __read_pmpcfg1);
101101
write_csr_as_usize_rv32!(0x3A1, __write_pmpcfg1);
102102

103-
set_pmp!(Range,Permission);
103+
set_pmp!();
104104
clear_pmp!();
105105
}
106106

@@ -113,7 +113,7 @@ pub mod pmpcfg2 {
113113
read_csr_as!(Pmpcsr, 0x3A2, __read_pmpcfg2);
114114
write_csr_as_usize!(0x3A2, __write_pmpcfg2);
115115

116-
set_pmp!(Range,Permission);
116+
set_pmp!();
117117
clear_pmp!();
118118
}
119119

@@ -127,6 +127,6 @@ pub mod pmpcfg3 {
127127
read_csr_as!(Pmpcsr, 0x3A3, __read_pmpcfg3);
128128
write_csr_as_usize_rv32!(0x3A3, __write_pmpcfg3);
129129

130-
set_pmp!(Range,Permission);
130+
set_pmp!();
131131
clear_pmp!();
132132
}

0 commit comments

Comments
 (0)