1 parent 2a16f58 commit b121924Copy full SHA for b121924
1 file changed
cortex-m/src/peripheral/nvic.rs
@@ -12,9 +12,10 @@ unsafe impl Send for NVIC {}
12
impl NVIC {
13
/// Create a new instance of the NVIC driver.
14
///
15
- /// This API consumes the peripheral singleton instance.
+ /// This API consumes the NVIC field of the [super::Peripherals] instance.
16
#[inline]
17
pub const fn new(_resource: OwnedRegisterBlock<{ BASE_ADDRESS }>) -> Self {
18
+ // Safety: NVIC field of singleton is consumed here to verify ownership transfer.
19
unsafe { Self::steal() }
20
}
21
0 commit comments