File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1111
1212### Changed
1313
14- - ` Mtvec::trap_mode() ` not returns ` Option<TrapMode> ` (breaking change)
14+ - ` Mtvec::trap_mode() ` , ` Stvec::trap_mode() ` and ` Utvec::trap_mode() ` functions now return ` Option<TrapMode> ` (breaking change)
1515- Updated Minimum Supported Rust Version to 1.42.0
1616- Use ` llvm_asm! ` instead of ` asm! `
1717
Original file line number Diff line number Diff line change @@ -20,12 +20,12 @@ impl Stvec {
2020 }
2121
2222 /// Returns the trap-vector mode
23- pub fn trap_mode ( & self ) -> TrapMode {
23+ pub fn trap_mode ( & self ) -> Option < TrapMode > {
2424 let mode = self . bits & 0b11 ;
2525 match mode {
26- 0 => TrapMode :: Direct ,
27- 1 => TrapMode :: Vectored ,
28- _ => unimplemented ! ( ) ,
26+ 0 => Some ( TrapMode :: Direct ) ,
27+ 1 => Some ( TrapMode :: Vectored ) ,
28+ _ => None ,
2929 }
3030 }
3131}
Original file line number Diff line number Diff line change @@ -20,12 +20,12 @@ impl Utvec {
2020 }
2121
2222 /// Returns the trap-vector mode
23- pub fn trap_mode ( & self ) -> TrapMode {
23+ pub fn trap_mode ( & self ) -> Option < TrapMode > {
2424 let mode = self . bits & 0b11 ;
2525 match mode {
26- 0 => TrapMode :: Direct ,
27- 1 => TrapMode :: Vectored ,
28- _ => unimplemented ! ( ) ,
26+ 0 => Some ( TrapMode :: Direct ) ,
27+ 1 => Some ( TrapMode :: Vectored ) ,
28+ _ => None ,
2929 }
3030 }
3131}
You can’t perform that action at this time.
0 commit comments