File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed 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
+ ### Breaking changes
11
+
12
+ - ` NVIC::request() ` no longer requires ` &mut self ` .
13
+
10
14
### Added
11
15
- Updated ` SCB.ICSR.VECTACTIVE ` /` SCB::vect_active() ` to be 9 bits instead of 8.
12
16
Also fixes ` VectActive::from ` to take a ` u16 ` and subtract ` 16 ` for
Original file line number Diff line number Diff line change @@ -94,15 +94,14 @@ impl NVIC {
94
94
/// [`NVIC::pend`]: #method.pend
95
95
#[ cfg( not( armv6m) ) ]
96
96
#[ inline]
97
- pub fn request < I > ( & mut self , interrupt : I )
97
+ pub fn request < I > ( interrupt : I )
98
98
where
99
99
I : InterruptNumber ,
100
100
{
101
101
let nr = interrupt. number ( ) ;
102
102
103
- unsafe {
104
- self . stir . write ( u32:: from ( nr) ) ;
105
- }
103
+ // NOTE(ptr) this is a write to a stateless register
104
+ unsafe { ( * Self :: PTR ) . stir . write ( u32:: from ( nr) ) }
106
105
}
107
106
108
107
/// Disables `interrupt`
You can’t perform that action at this time.
0 commit comments