There was an error while loading. Please reload this page.
1 parent fece9b0 commit 4bb60ceCopy full SHA for 4bb60ce
1 file changed
embassy-stm32/src/exti.rs
@@ -269,12 +269,14 @@ impl<'a> ExtiInputFuture<'a> {
269
critical_section::with(|_| {
270
let pin = pin as usize;
271
#[cfg(exti_n6)]
272
- {
+ let port = {
273
const STM32_PORTI: PinNumber = 0x8;
274
const STM32_PORTN: PinNumber = 0xD;
275
- if (port >= STM32_PORTN) {
276
- // Ports N and above (starting index 13) use value 8 and higher
277
- port = port - (STM32_PORTN - STM32_PORTI);
+ // Ports N and above (starting index 13) use value 8 and higher
+ if port >= STM32_PORTN {
+ port - (STM32_PORTN - STM32_PORTI)
278
+ } else {
279
+ port
280
}
281
282
exticr_regs().exticr(pin / 4).modify(|w| w.set_exti(pin % 4, port));
0 commit comments