We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32eedef commit 1db9304Copy full SHA for 1db9304
1 file changed
chips/stm32u5xx/src/gpio.rs
@@ -2,6 +2,7 @@
2
// SPDX-License-Identifier: Apache-2.0 OR MIT
3
// Copyright OxidOS Automotive 2026.
4
5
+use enum_primitive::cast::FromPrimitive;
6
use kernel::hil::gpio;
7
use kernel::utilities::cells::OptionalCell;
8
use kernel::utilities::registers::interfaces::{Readable, Writeable};
@@ -279,7 +280,7 @@ impl<'a> gpio::Interrupt<'a> for Pin<'a> {
279
280
fn enable_interrupts(&self, mode: gpio::InterruptEdge) {
281
let line_num = self.pin;
282
if line_num < 16 {
- let line = unsafe { core::mem::transmute::<u8, LineId>(line_num as u8) };
283
+ let line = LineId::from_u8(line_num as u8).unwrap();
284
self.exti_lineid.set(line);
285
286
self.client.map(|client| {
0 commit comments