Skip to content

Commit d85beaf

Browse files
committed
macros: change CSR mask to an expr type
Changes the macro argument type to `expr` to allow using constants, expressions, and other initializers for CSR mask values.
1 parent fe6da17 commit d85beaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

riscv/src/register/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ macro_rules! clear_pmp {
498498
macro_rules! csr {
499499
($(#[$doc:meta])*
500500
$ty:ident,
501-
$mask:literal) => {
501+
$mask:expr) => {
502502
#[repr(C)]
503503
$(#[$doc])*
504504
#[derive(Clone, Copy, Debug, Eq, PartialEq)]

0 commit comments

Comments
 (0)