Trait embedded_hal::PwmPin

source ·
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);
}
Expand description

A single PWM channel / pin

See Pwm for details

Required Associated Types§

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§

Disables a PWM channel

Enables a PWM channel

Returns the current duty cycle

Returns the maximum duty cycle value

Sets a new duty cycle

Implementors§