aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/dma
diff options
context:
space:
mode:
authoreverdrone <[email protected]>2025-11-11 17:00:41 +0100
committereverdrone <[email protected]>2025-11-11 17:00:41 +0100
commit94c4cd8500b131bbfb0ed22176c35dc4df5ff009 (patch)
treed42ce0ef8fcca3d654566e6d83eee8978435e664 /embassy-stm32/src/dma
parent6e7855d84e3bfd724ac0eacc20db34c1eee0761b (diff)
cfg out unused items
Diffstat (limited to 'embassy-stm32/src/dma')
-rw-r--r--embassy-stm32/src/dma/gpdma/mod.rs1
-rw-r--r--embassy-stm32/src/dma/mod.rs4
2 files changed, 5 insertions, 0 deletions
diff --git a/embassy-stm32/src/dma/gpdma/mod.rs b/embassy-stm32/src/dma/gpdma/mod.rs
index 3e117c331..106558d20 100644
--- a/embassy-stm32/src/dma/gpdma/mod.rs
+++ b/embassy-stm32/src/dma/gpdma/mod.rs
@@ -136,6 +136,7 @@ pub(crate) unsafe fn init(cs: critical_section::CriticalSection, irq_priority: c
136 136
137impl AnyChannel { 137impl AnyChannel {
138 /// Safety: Must be called with a matching set of parameters for a valid dma channel 138 /// Safety: Must be called with a matching set of parameters for a valid dma channel
139 #[cfg(not(stm32n6))]
139 pub(crate) unsafe fn on_irq(&self) { 140 pub(crate) unsafe fn on_irq(&self) {
140 let info = self.info(); 141 let info = self.info();
141 #[cfg(feature = "_dual-core")] 142 #[cfg(feature = "_dual-core")]
diff --git a/embassy-stm32/src/dma/mod.rs b/embassy-stm32/src/dma/mod.rs
index 297fa3674..de7a2c175 100644
--- a/embassy-stm32/src/dma/mod.rs
+++ b/embassy-stm32/src/dma/mod.rs
@@ -46,9 +46,11 @@ pub type Request = u8;
46pub type Request = (); 46pub type Request = ();
47 47
48pub(crate) trait SealedChannel { 48pub(crate) trait SealedChannel {
49 #[cfg(not(stm32n6))]
49 fn id(&self) -> u8; 50 fn id(&self) -> u8;
50} 51}
51 52
53#[cfg(not(stm32n6))]
52pub(crate) trait ChannelInterrupt { 54pub(crate) trait ChannelInterrupt {
53 #[cfg_attr(not(feature = "rt"), allow(unused))] 55 #[cfg_attr(not(feature = "rt"), allow(unused))]
54 unsafe fn on_irq(); 56 unsafe fn on_irq();
@@ -58,6 +60,7 @@ pub(crate) trait ChannelInterrupt {
58#[allow(private_bounds)] 60#[allow(private_bounds)]
59pub trait Channel: SealedChannel + PeripheralType + Into<AnyChannel> + 'static {} 61pub trait Channel: SealedChannel + PeripheralType + Into<AnyChannel> + 'static {}
60 62
63#[cfg(not(stm32n6))]
61macro_rules! dma_channel_impl { 64macro_rules! dma_channel_impl {
62 ($channel_peri:ident, $index:expr) => { 65 ($channel_peri:ident, $index:expr) => {
63 impl crate::dma::SealedChannel for crate::peripherals::$channel_peri { 66 impl crate::dma::SealedChannel for crate::peripherals::$channel_peri {
@@ -96,6 +99,7 @@ impl AnyChannel {
96} 99}
97 100
98impl SealedChannel for AnyChannel { 101impl SealedChannel for AnyChannel {
102 #[cfg(not(stm32n6))]
99 fn id(&self) -> u8 { 103 fn id(&self) -> u8 {
100 self.id 104 self.id
101 } 105 }