File tree Expand file tree Collapse file tree 11 files changed +21
-15
lines changed Expand file tree Collapse file tree 11 files changed +21
-15
lines changed Original file line number Diff line number Diff line change 11
11
build-riscv :
12
12
strategy :
13
13
matrix :
14
- # All generated code should be running on stable now, MRSV is 1.75 .0
15
- toolchain : [ stable, nightly, 1.75 .0 ]
14
+ # All generated code should be running on stable now, MRSV is 1.85 .0
15
+ toolchain : [ stable, nightly, 1.85 .0 ]
16
16
target :
17
17
- riscv32i-unknown-none-elf
18
18
- riscv32imc-unknown-none-elf
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
7
7
8
8
## [ Unreleased]
9
9
10
+ ### Changed
11
+
12
+ - Update to Rust edition 2024 (MSRV 1.85)
13
+
10
14
## [ v0.3.0] - 2025-06-10
11
15
12
16
### Changed
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " riscv-peripheral"
3
3
version = " 0.3.0"
4
- edition = " 2021 "
5
- rust-version = " 1.75 "
4
+ edition = " 2024 "
5
+ rust-version = " 1.85 "
6
6
repository = " https://github.com/rust-embedded/riscv"
7
7
authors = [" The RISC-V Team <risc-v@teams.rust-embedded.org>" ]
8
8
categories = [" embedded" , " hardware-support" , " no-std" ]
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ This project is developed and maintained by the [RISC-V team][team].
11
11
12
12
## Minimum Supported Rust Version (MSRV)
13
13
14
- This crate is guaranteed to compile on stable Rust 1.75 and up. It * might *
14
+ This crate is guaranteed to compile on stable Rust 1.85 and up. It ** won't * *
15
15
compile with older versions but that may change in any new patch release.
16
16
17
17
## License
Original file line number Diff line number Diff line change @@ -78,8 +78,10 @@ impl<C: Clint> CLINT<C> {
78
78
/// Enabling the `CLINT` may break mask-based critical sections.
79
79
#[ inline]
80
80
pub unsafe fn enable ( self ) {
81
- self . mswi ( ) . enable ( ) ;
82
- self . mtimer ( ) . enable ( ) ;
81
+ unsafe {
82
+ self . mswi ( ) . enable ( ) ;
83
+ self . mtimer ( ) . enable ( ) ;
84
+ }
83
85
}
84
86
85
87
/// Disables machine timer **AND** software interrupts to prevent the CLINT from triggering interrupts.
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ impl<M: Mswi> MSWI<M> {
64
64
/// Enabling interrupts may break mask-based critical sections.
65
65
#[ inline]
66
66
pub unsafe fn enable ( self ) {
67
- mie:: set_msoft ( ) ;
67
+ unsafe { mie:: set_msoft ( ) } ;
68
68
}
69
69
70
70
/// Disables machine software interrupts in the current HART.
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ impl<M: Mtimer> MTIMER<M> {
81
81
/// Enabling interrupts may break mask-based critical sections.
82
82
#[ inline]
83
83
pub unsafe fn enable ( self ) {
84
- mie:: set_mtimer ( ) ;
84
+ unsafe { mie:: set_mtimer ( ) } ;
85
85
}
86
86
87
87
/// Disables machine timer interrupts in the current HART.
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ impl<S: Sswi> SSWI<S> {
55
55
/// Enabling interrupts may break mask-based critical sections.
56
56
#[ inline]
57
57
pub unsafe fn enable ( self ) {
58
- sie:: set_ssoft ( ) ;
58
+ unsafe { sie:: set_ssoft ( ) } ;
59
59
}
60
60
61
61
/// Disables supervisor software interrupts in the current HART.
Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ macro_rules! peripheral {
265
265
#[ inline]
266
266
pub const unsafe fn new( address: usize ) -> Self {
267
267
Self {
268
- register: $crate:: common:: Reg :: new( address as _) ,
268
+ register: unsafe { $crate:: common:: Reg :: new( address as _) } ,
269
269
}
270
270
}
271
271
}
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ impl<P: Plic> PLIC<P> {
72
72
/// Enabling the `PLIC` may break mask-based critical sections.
73
73
#[ inline]
74
74
pub unsafe fn enable ( self ) {
75
- mie:: set_mext ( ) ;
75
+ unsafe { mie:: set_mext ( ) } ;
76
76
}
77
77
78
78
/// Disables machine external interrupts to prevent the PLIC from triggering interrupts.
You can’t perform that action at this time.
0 commit comments