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/).
77
88## [ Unreleased]
99
10+ ### Breaking changes
11+
12+ - ` NVIC::request() ` no longer requires ` &mut self ` .
13+
1014### Added
1115- Updated ` SCB.ICSR.VECTACTIVE ` /` SCB::vect_active() ` to be 9 bits instead of 8.
1216 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 {
9494 /// [`NVIC::pend`]: #method.pend
9595 #[ cfg( not( armv6m) ) ]
9696 #[ inline]
97- pub fn request < I > ( & mut self , interrupt : I )
97+ pub fn request < I > ( interrupt : I )
9898 where
9999 I : InterruptNumber ,
100100 {
101101 let nr = interrupt. number ( ) ;
102102
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) ) }
106105 }
107106
108107 /// Disables `interrupt`
You can’t perform that action at this time.
0 commit comments