Trait _embedded_hal_PwmPin

Source
pub trait _embedded_hal_PwmPin {
    type Duty;

    // Required methods
    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§

Source

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§

Source

fn disable(&mut self)

Disables a PWM channel

Source

fn enable(&mut self)

Enables a PWM channel

Source

fn get_duty(&self) -> Self::Duty

Returns the current duty cycle

Source

fn get_max_duty(&self) -> Self::Duty

Returns the maximum duty cycle value

Source

fn set_duty(&mut self, duty: Self::Duty)

Sets a new duty cycle

Implementors§

Source§

impl PwmPin for PwmChannel<Tim1Ch1, WithNPins>

Source§

impl PwmPin for PwmChannel<Tim1Ch1, WithPins>

Source§

impl PwmPin for PwmChannel<Tim1Ch2, WithNPins>

Source§

impl PwmPin for PwmChannel<Tim1Ch2, WithPins>

Source§

impl PwmPin for PwmChannel<Tim1Ch3, WithNPins>

Source§

impl PwmPin for PwmChannel<Tim1Ch3, WithPins>

Source§

impl PwmPin for PwmChannel<Tim1Ch4, WithPins>

Source§

impl PwmPin for PwmChannel<Tim2Ch1, WithPins>

Source§

impl PwmPin for PwmChannel<Tim2Ch2, WithPins>

Source§

impl PwmPin for PwmChannel<Tim2Ch3, WithPins>

Source§

impl PwmPin for PwmChannel<Tim2Ch4, WithPins>

Source§

impl PwmPin for PwmChannel<Tim3Ch1, WithPins>

Source§

impl PwmPin for PwmChannel<Tim3Ch2, WithPins>

Source§

impl PwmPin for PwmChannel<Tim3Ch3, WithPins>

Source§

impl PwmPin for PwmChannel<Tim3Ch4, WithPins>

Source§

impl PwmPin for PwmChannel<Tim4Ch1, WithPins>

Source§

impl PwmPin for PwmChannel<Tim4Ch2, WithPins>

Source§

impl PwmPin for PwmChannel<Tim4Ch3, WithPins>

Source§

impl PwmPin for PwmChannel<Tim4Ch4, WithPins>

Source§

impl PwmPin for PwmChannel<Tim8Ch1, WithNPins>

Source§

impl PwmPin for PwmChannel<Tim8Ch1, WithPins>

Source§

impl PwmPin for PwmChannel<Tim8Ch2, WithNPins>

Source§

impl PwmPin for PwmChannel<Tim8Ch2, WithPins>

Source§

impl PwmPin for PwmChannel<Tim8Ch3, WithNPins>

Source§

impl PwmPin for PwmChannel<Tim8Ch3, WithPins>

Source§

impl PwmPin for PwmChannel<Tim8Ch4, WithPins>

Source§

impl PwmPin for PwmChannel<Tim15Ch1, WithNPins>

Source§

impl PwmPin for PwmChannel<Tim15Ch1, WithPins>

Source§

impl PwmPin for PwmChannel<Tim15Ch2, WithPins>

Source§

impl PwmPin for PwmChannel<Tim16Ch1, WithNPins>

Source§

impl PwmPin for PwmChannel<Tim16Ch1, WithPins>

Source§

impl PwmPin for PwmChannel<Tim17Ch1, WithNPins>

Source§

impl PwmPin for PwmChannel<Tim17Ch1, WithPins>