pub struct TriplePwm<'d> {
pub pwm0: Pwm<'d>,
pub pwm1: Pwm<'d>,
pub pwm2: Pwm<'d>,
/* private fields */
}Expand description
Triple channel PWM driver.
A single period match channel is shared for three independent PWM outputs. That is, all three PWM output channels run on the same frequency, with optionally different duty cycles.
Fields§
§pwm0: Pwm<'d>§pwm1: Pwm<'d>§pwm2: Pwm<'d>Implementations§
Source§impl<'d> TriplePwm<'d>
impl<'d> TriplePwm<'d>
Sourcepub fn new<T: Instance, DUTY0: CTimerChannel<T>, DUTY1: CTimerChannel<T>, DUTY2: CTimerChannel<T>, PIN0: OutputPin<T>, PIN1: OutputPin<T>, PIN2: OutputPin<T>>(
ctimer: CTimer<'d>,
duty_ch0: Peri<'d, DUTY0>,
duty_ch1: Peri<'d, DUTY1>,
duty_ch2: Peri<'d, DUTY2>,
period_ch: Peri<'d, impl CTimerChannel<T>>,
pin0: Peri<'d, PIN0>,
pin1: Peri<'d, PIN1>,
pin2: Peri<'d, PIN2>,
config: Config,
) -> Result<Self, PwmError>
pub fn new<T: Instance, DUTY0: CTimerChannel<T>, DUTY1: CTimerChannel<T>, DUTY2: CTimerChannel<T>, PIN0: OutputPin<T>, PIN1: OutputPin<T>, PIN2: OutputPin<T>>( ctimer: CTimer<'d>, duty_ch0: Peri<'d, DUTY0>, duty_ch1: Peri<'d, DUTY1>, duty_ch2: Peri<'d, DUTY2>, period_ch: Peri<'d, impl CTimerChannel<T>>, pin0: Peri<'d, PIN0>, pin1: Peri<'d, PIN1>, pin2: Peri<'d, PIN2>, config: Config, ) -> Result<Self, PwmError>
Create Pwm driver using three pins for three PWM outputs.
Upon Drop, all external pins will be placed into Disabled
state.
Auto Trait Implementations§
impl<'d> Freeze for TriplePwm<'d>
impl<'d> !RefUnwindSafe for TriplePwm<'d>
impl<'d> Send for TriplePwm<'d>
impl<'d> Sync for TriplePwm<'d>
impl<'d> Unpin for TriplePwm<'d>
impl<'d> !UnwindSafe for TriplePwm<'d>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more