Trait embedded_hal::PwmPin
[−]
[src]
pub trait PwmPin { type Duty; fn disable(&mut self); fn enable(&mut self); fn get_duty(&self) -> Self::Duty; fn get_max_duty(&self) -> Self::Duty; fn set_duty(&mut self, duty: Self::Duty); }
A single PWM channel / pin
See Pwm
for details
Associated Types
type Duty
[−]
Type for the duty
methods
The implementer is free to choose a float / percentage representation
(e.g. 0.0 .. 1.0
) or an integer representation (e.g. 0 .. 65535
)
Required Methods
fn disable(&mut self)
[−]
Disables a PWM channel
fn enable(&mut self)
[−]
Enables a PWM channel
fn get_duty(&self) -> Self::Duty
[−]
Returns the current duty cycle
fn get_max_duty(&self) -> Self::Duty
[−]
Returns the maximum duty cycle value
fn set_duty(&mut self, duty: Self::Duty)
[−]
Sets a new duty cycle
Implementors
impl PwmPin for Pwm<TIM2, C1>
impl PwmPin for Pwm<TIM2, C2>
impl PwmPin for Pwm<TIM2, C3>
impl PwmPin for Pwm<TIM2, C4>
impl PwmPin for Pwm<TIM3, C1>
impl PwmPin for Pwm<TIM3, C2>
impl PwmPin for Pwm<TIM3, C3>
impl PwmPin for Pwm<TIM3, C4>
impl PwmPin for Pwm<TIM4, C1>
impl PwmPin for Pwm<TIM4, C2>
impl PwmPin for Pwm<TIM4, C3>
impl PwmPin for Pwm<TIM4, C4>