[][src]Trait stm32f3xx_hal_v2::prelude::_embedded_hal_PwmPin

pub trait _embedded_hal_PwmPin {
    type Duty;
    pub fn disable(&mut self);
pub fn enable(&mut self);
pub fn get_duty(&self) -> Self::Duty;
pub fn get_max_duty(&self) -> Self::Duty;
pub fn set_duty(&mut self, duty: Self::Duty); }

A single PWM channel / pin

See Pwm for details

Associated Types

type Duty[src]

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)

Loading content...

Required methods

pub fn disable(&mut self)[src]

Disables a PWM channel

pub fn enable(&mut self)[src]

Enables a PWM channel

pub fn get_duty(&self) -> Self::Duty[src]

Returns the current duty cycle

pub fn get_max_duty(&self) -> Self::Duty[src]

Returns the maximum duty cycle value

pub fn set_duty(&mut self, duty: Self::Duty)[src]

Sets a new duty cycle

Loading content...

Implementors

impl PwmPin for PwmChannel<TIM1_CH1, WithNPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM1_CH1, WithPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM1_CH2, WithNPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM1_CH2, WithPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM1_CH3, WithNPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM1_CH3, WithPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM1_CH4, WithPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM2_CH1, WithPins>[src]

type Duty = u32

impl PwmPin for PwmChannel<TIM2_CH2, WithPins>[src]

type Duty = u32

impl PwmPin for PwmChannel<TIM2_CH3, WithPins>[src]

type Duty = u32

impl PwmPin for PwmChannel<TIM2_CH4, WithPins>[src]

type Duty = u32

impl PwmPin for PwmChannel<TIM3_CH1, WithPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM3_CH2, WithPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM3_CH3, WithPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM3_CH4, WithPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM4_CH1, WithPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM4_CH2, WithPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM4_CH3, WithPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM4_CH4, WithPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM8_CH1, WithNPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM8_CH1, WithPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM8_CH2, WithNPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM8_CH2, WithPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM8_CH3, WithNPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM8_CH3, WithPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM8_CH4, WithPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM15_CH1, WithNPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM15_CH1, WithPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM15_CH2, WithPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM16_CH1, WithNPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM16_CH1, WithPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM17_CH1, WithNPins>[src]

type Duty = u16

impl PwmPin for PwmChannel<TIM17_CH1, WithPins>[src]

type Duty = u16

Loading content...