[][src]Trait kernel::hil::pwm::PwmPin

pub trait PwmPin {
    fn start(&self, frequency_hz: usize, duty_cycle: usize) -> ReturnCode;
fn stop(&self) -> ReturnCode;
fn get_maximum_frequency_hz(&self) -> usize;
fn get_maximum_duty_cycle(&self) -> usize; }

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

fn start(&self, frequency_hz: usize, duty_cycle: usize) -> ReturnCode

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

fn stop(&self) -> ReturnCode

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

fn get_maximum_frequency_hz(&self) -> usize

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

fn get_maximum_duty_cycle(&self) -> usize

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

Loading content...

Implementors

Loading content...