aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src
diff options
context:
space:
mode:
authorWillaWillNot <[email protected]>2025-11-22 18:18:04 -0500
committerWillaWillNot <[email protected]>2025-11-22 18:18:04 -0500
commitb877b0dc6b5fe4541a45e6b43ed9d82131608aee (patch)
tree6bc432aa7081bf6d2df36e322d5c742eaa449977 /embassy-stm32/src
parent2589d3539903356c524b38f04f740b1735a80207 (diff)
Build script now injects EXTI2 => EXTI2_TSC peripheral/interrupt mapping if it's not present in the PAC, removed macro magic in exti that was working around this omission
Diffstat (limited to 'embassy-stm32/src')
-rw-r--r--embassy-stm32/src/exti.rs18
1 files changed, 4 insertions, 14 deletions
diff --git a/embassy-stm32/src/exti.rs b/embassy-stm32/src/exti.rs
index 57217034e..7b7896d46 100644
--- a/embassy-stm32/src/exti.rs
+++ b/embassy-stm32/src/exti.rs
@@ -395,40 +395,30 @@ pub struct AnyChannel {
395 395
396macro_rules! impl_exti { 396macro_rules! impl_exti {
397 ($type:ident, $number:expr) => { 397 ($type:ident, $number:expr) => {
398 impl_exti!(@inner $type, $number, crate::_generated::peripheral_interrupts::EXTI::$type);
399 };
400 ($type:ident, $number:expr, @tsc) => {
401 impl_exti!(@inner $type, $number, crate::_generated::peripheral_interrupts::TSC::GLOBAL);
402 };
403 (@inner $type:ident, $number:expr, $irq:path) => {
404 impl SealedChannel for crate::peripherals::$type {} 398 impl SealedChannel for crate::peripherals::$type {}
405 impl Channel for crate::peripherals::$type { 399 impl Channel for crate::peripherals::$type {
406 fn number(&self) -> PinNumber { 400 fn number(&self) -> PinNumber {
407 $number 401 $number
408 } 402 }
409 fn irq(&self) -> InterruptEnum { 403 fn irq(&self) -> InterruptEnum {
410 <$irq>::IRQ 404 crate::_generated::peripheral_interrupts::EXTI::$type::IRQ
411 } 405 }
412 type IRQ = $irq; 406 type IRQ = crate::_generated::peripheral_interrupts::EXTI::$type;
413 } 407 }
414 408
415 //Still here to surface deprecation messages to the user - remove when removing AnyChannel 409 //Still here to surface deprecation messages to the user - remove when removing AnyChannel
416 #[allow(deprecated)] 410 #[allow(deprecated)]
417 impl From<crate::peripherals::$type> for AnyChannel { 411 impl From<crate::peripherals::$type> for AnyChannel {
418 fn from(_val: crate::peripherals::$type) -> Self { 412 fn from(_val: crate::peripherals::$type) -> Self {
419 Self { 413 Self { number: $number }
420 number: $number,
421 } 414 }
422 }} 415 }
423 }; 416 };
424} 417}
425 418
426impl_exti!(EXTI0, 0); 419impl_exti!(EXTI0, 0);
427impl_exti!(EXTI1, 1); 420impl_exti!(EXTI1, 1);
428#[cfg(not(any(tsc, unimpl_tsc)))]
429impl_exti!(EXTI2, 2); 421impl_exti!(EXTI2, 2);
430#[cfg(any(tsc, unimpl_tsc))]
431impl_exti!(EXTI2, 2, @tsc);
432impl_exti!(EXTI3, 3); 422impl_exti!(EXTI3, 3);
433impl_exti!(EXTI4, 4); 423impl_exti!(EXTI4, 4);
434impl_exti!(EXTI5, 5); 424impl_exti!(EXTI5, 5);