@@ -41,6 +41,7 @@ use super::{
41
41
Polarity , Timer , WithPwm ,
42
42
} ;
43
43
pub use super :: { Ch , C1 , C2 , C3 , C4 } ;
44
+ use crate :: dma:: traits:: DMASet ;
44
45
use crate :: gpio:: { OpenDrain , PushPull } ;
45
46
use crate :: rcc:: Rcc ;
46
47
use core:: ops:: { Deref , DerefMut } ;
@@ -183,6 +184,14 @@ pub struct PwmChannel<TIM: CPin<C>, const C: u8, const COMP: bool = false, Otype
183
184
// TODO: add complementary pins
184
185
}
185
186
187
+ unsafe impl < TIM , const C : u8 , const COMP : bool , Otype , STREAM , const CHANNEL : u8 , DIRECTION >
188
+ DMASet < STREAM , CHANNEL , DIRECTION > for PwmChannel < TIM , C , COMP , Otype >
189
+ where
190
+ TIM : CPin < C > ,
191
+ super :: CCR < TIM , C > : DMASet < STREAM , CHANNEL , DIRECTION > ,
192
+ {
193
+ }
194
+
186
195
impl < TIM : Instance + WithPwm + CPin < C > , const C : u8 , const COMP : bool , Otype >
187
196
PwmChannel < TIM , C , COMP , Otype >
188
197
{
@@ -339,6 +348,14 @@ where
339
348
pub ( super ) timer : FTimer < TIM , FREQ > ,
340
349
}
341
350
351
+ unsafe impl < TIM , const FREQ : u32 , STREAM , const CHANNEL : u8 , DIRECTION >
352
+ DMASet < STREAM , CHANNEL , DIRECTION > for PwmManager < TIM , FREQ >
353
+ where
354
+ TIM : Instance + WithPwm ,
355
+ super :: DMAR < TIM > : DMASet < STREAM , CHANNEL , DIRECTION > ,
356
+ {
357
+ }
358
+
342
359
impl < TIM , const FREQ : u32 > PwmManager < TIM , FREQ >
343
360
where
344
361
TIM : Instance + WithPwm + Split ,
0 commit comments