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 1111 build-riscv :
1212 strategy :
1313 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 ]
1616 target :
1717 - riscv32i-unknown-none-elf
1818 - 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/).
77
88## [ Unreleased]
99
10+ ### Changed
11+
12+ - Update to Rust edition 2024 (MSRV 1.85)
13+
1014## [ v0.3.0] - 2025-06-10
1115
1216### Changed
Original file line number Diff line number Diff line change 11[package ]
22name = " riscv-peripheral"
33version = " 0.3.0"
4- edition = " 2021 "
5- rust-version = " 1.75 "
4+ edition = " 2024 "
5+ rust-version = " 1.85 "
66repository = " https://github.com/rust-embedded/riscv"
77authors = [" The RISC-V Team <risc-v@teams.rust-embedded.org>" ]
88categories = [" 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].
1111
1212## Minimum Supported Rust Version (MSRV)
1313
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 * *
1515compile with older versions but that may change in any new patch release.
1616
1717## License
Original file line number Diff line number Diff line change @@ -78,8 +78,10 @@ impl<C: Clint> CLINT<C> {
7878 /// Enabling the `CLINT` may break mask-based critical sections.
7979 #[ inline]
8080 pub unsafe fn enable ( self ) {
81- self . mswi ( ) . enable ( ) ;
82- self . mtimer ( ) . enable ( ) ;
81+ unsafe {
82+ self . mswi ( ) . enable ( ) ;
83+ self . mtimer ( ) . enable ( ) ;
84+ }
8385 }
8486
8587 /// 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> {
6464 /// Enabling interrupts may break mask-based critical sections.
6565 #[ inline]
6666 pub unsafe fn enable ( self ) {
67- mie:: set_msoft ( ) ;
67+ unsafe { mie:: set_msoft ( ) } ;
6868 }
6969
7070 /// 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> {
8181 /// Enabling interrupts may break mask-based critical sections.
8282 #[ inline]
8383 pub unsafe fn enable ( self ) {
84- mie:: set_mtimer ( ) ;
84+ unsafe { mie:: set_mtimer ( ) } ;
8585 }
8686
8787 /// 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> {
5555 /// Enabling interrupts may break mask-based critical sections.
5656 #[ inline]
5757 pub unsafe fn enable ( self ) {
58- sie:: set_ssoft ( ) ;
58+ unsafe { sie:: set_ssoft ( ) } ;
5959 }
6060
6161 /// 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 {
265265 #[ inline]
266266 pub const unsafe fn new( address: usize ) -> Self {
267267 Self {
268- register: $crate:: common:: Reg :: new( address as _) ,
268+ register: unsafe { $crate:: common:: Reg :: new( address as _) } ,
269269 }
270270 }
271271 }
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ impl<P: Plic> PLIC<P> {
7272 /// Enabling the `PLIC` may break mask-based critical sections.
7373 #[ inline]
7474 pub unsafe fn enable ( self ) {
75- mie:: set_mext ( ) ;
75+ unsafe { mie:: set_mext ( ) } ;
7676 }
7777
7878 /// Disables machine external interrupts to prevent the PLIC from triggering interrupts.
You can’t perform that action at this time.
0 commit comments