Skip to content

Commit 55f3eae

Browse files
committed
Make GPIO split_without reset unsafe.
1 parent b524a47 commit 55f3eae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gpio.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ pub trait GpioExt {
125125
fn split(self) -> Self::Parts;
126126

127127
/// Splits the GPIO block into independent pins and registers without resetting its state.
128-
fn split_without_reset(self) -> Self::Parts;
128+
unsafe fn split_without_reset(self) -> Self::Parts;
129129
}
130130

131131
/// Marker trait for active states.
@@ -397,7 +397,7 @@ macro_rules! gpio {
397397
}
398398
}
399399

400-
fn split_without_reset(self) -> Parts {
400+
unsafe fn split_without_reset(self) -> Parts {
401401
let rcc = unsafe { &(*RCC::ptr()) };
402402
$GPIOX::enable(rcc);
403403

0 commit comments

Comments
 (0)