@@ -41,6 +41,7 @@ use super::{
4141 Polarity , Timer , WithPwm ,
4242} ;
4343pub use super :: { Ch , C1 , C2 , C3 , C4 } ;
44+ use crate :: dma:: traits:: DMASet ;
4445use crate :: gpio:: { OpenDrain , PushPull } ;
4546use crate :: rcc:: Rcc ;
4647use core:: ops:: { Deref , DerefMut } ;
@@ -183,6 +184,14 @@ pub struct PwmChannel<TIM: CPin<C>, const C: u8, const COMP: bool = false, Otype
183184 // TODO: add complementary pins
184185}
185186
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+
186195impl < TIM : Instance + WithPwm + CPin < C > , const C : u8 , const COMP : bool , Otype >
187196 PwmChannel < TIM , C , COMP , Otype >
188197{
@@ -339,6 +348,14 @@ where
339348 pub ( super ) timer : FTimer < TIM , FREQ > ,
340349}
341350
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+
342359impl < TIM , const FREQ : u32 > PwmManager < TIM , FREQ >
343360where
344361 TIM : Instance + WithPwm + Split ,
0 commit comments