pub trait PwmPin {
    fn start(
        &self,
        frequency_hz: usize,
        duty_cycle: usize
    ) -> Result<(), ErrorCode>; fn stop(&self) -> Result<(), ErrorCode>; fn get_maximum_frequency_hz(&self) -> usize; fn get_maximum_duty_cycle(&self) -> usize; }
Expand description

Higher-level PWM interface that restricts the user to a specific PWM pin. This is particularly useful for passing to capsules that need to control only a specific pin.

Required Methods

Start a PWM output. Same as the start function in the Pwm trait.

Stop a PWM output. Same as the stop function in the Pwm trait.

Return the maximum PWM frequency supported by the PWM implementation. Same as the get_maximum_frequency_hz function in the Pwm trait.

Return an opaque number that represents a 100% duty cycle. This value Same as the get_maximum_duty_cycle function in the Pwm trait.

Implementors