Skip to content

Commit 769da06

Browse files
committed
Add default implementation to ACLINT structs
1 parent 271cf16 commit 769da06

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

riscv-peripheral/src/aclint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub unsafe trait Clint: Copy {
3333
/// Each HART has an assigned index starting from 0 to up to 4_094.
3434
/// In this way, each HART's timer and software interrupts can be independently configured.
3535
#[allow(clippy::upper_case_acronyms)]
36-
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
36+
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
3737
pub struct CLINT<C> {
3838
_marker: core::marker::PhantomData<C>,
3939
}

riscv-peripheral/src/aclint/mswi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ unsafe impl<C: Clint> Mswi for C {
2525
}
2626

2727
/// MSWI peripheral.
28-
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
28+
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
2929
pub struct MSWI<M> {
3030
_marker: core::marker::PhantomData<M>,
3131
}

riscv-peripheral/src/aclint/mtimer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ unsafe impl<C: Clint> Mtimer for C {
3636
///
3737
/// It has a single fixed-frequency monotonic time counter ([`MTIME`])
3838
/// register and a time compare register ([`MTIMECMP`]) for each HART.
39-
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
39+
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
4040
pub struct MTIMER<M> {
4141
_marker: core::marker::PhantomData<M>,
4242
}

riscv-peripheral/src/aclint/sswi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub unsafe trait Sswi: Copy {
1616
}
1717

1818
/// SSWI peripheral.
19-
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
19+
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
2020
pub struct SSWI<M> {
2121
_marker: core::marker::PhantomData<M>,
2222
}

0 commit comments

Comments
 (0)