Skip to content

Commit 3d93d8f

Browse files
committed
tock-registers: make Field::mask field public
This partially reverts commit 89505ae ("Make the Field::mask and FieldValue::mask fields private.") introduced through GitHub pull request tock/tock#1939. In order to be able to implement atomic RISC-V CSR bit-field-set and bit-field-clear operations which operate on tock-register's Fields, access to the Field::mask field is required. Signed-off-by: Leon Schuermann <[email protected]>
1 parent 0d28f5a commit 3d93d8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/tock-register-interface/src/registers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ impl<T: IntLike, R: RegisterLongName> InMemoryRegister<T, R> {
520520
/// For the Field, the mask is unshifted, ie. the LSB should always be set.
521521
#[derive(Copy, Clone)]
522522
pub struct Field<T: IntLike, R: RegisterLongName> {
523-
mask: T,
523+
pub mask: T,
524524
pub shift: usize,
525525
associated_register: PhantomData<R>,
526526
}

0 commit comments

Comments
 (0)