Struct Pwm

Source
pub struct Pwm<TIM, CHANNEL> { /* private fields */ }

Trait Implementations§

Source§

impl PwmPin for Pwm<TIM10, C1>

Source§

type Duty = u16

Type for the duty methods Read more
Source§

fn disable(&mut self)

Disables a PWM channel
Source§

fn enable(&mut self)

Enables a PWM channel
Source§

fn get_duty(&self) -> u16

Returns the current duty cycle
Source§

fn get_max_duty(&self) -> u16

Returns the maximum duty cycle value
Source§

fn set_duty(&mut self, duty: u16)

Sets a new duty cycle
Source§

impl PwmPin for Pwm<TIM11, C1>

Source§

type Duty = u16

Type for the duty methods Read more
Source§

fn disable(&mut self)

Disables a PWM channel
Source§

fn enable(&mut self)

Enables a PWM channel
Source§

fn get_duty(&self) -> u16

Returns the current duty cycle
Source§

fn get_max_duty(&self) -> u16

Returns the maximum duty cycle value
Source§

fn set_duty(&mut self, duty: u16)

Sets a new duty cycle
Source§

impl PwmPin for Pwm<TIM2, C1>

Source§

type Duty = u16

Type for the duty methods Read more
Source§

fn disable(&mut self)

Disables a PWM channel
Source§

fn enable(&mut self)

Enables a PWM channel
Source§

fn get_duty(&self) -> u16

Returns the current duty cycle
Source§

fn get_max_duty(&self) -> u16

Returns the maximum duty cycle value
Source§

fn set_duty(&mut self, duty: u16)

Sets a new duty cycle
Source§

impl PwmPin for Pwm<TIM2, C2>

Source§

type Duty = u16

Type for the duty methods Read more
Source§

fn disable(&mut self)

Disables a PWM channel
Source§

fn enable(&mut self)

Enables a PWM channel
Source§

fn get_duty(&self) -> u16

Returns the current duty cycle
Source§

fn get_max_duty(&self) -> u16

Returns the maximum duty cycle value
Source§

fn set_duty(&mut self, duty: u16)

Sets a new duty cycle
Source§

impl PwmPin for Pwm<TIM2, C3>

Source§

type Duty = u16

Type for the duty methods Read more
Source§

fn disable(&mut self)

Disables a PWM channel
Source§

fn enable(&mut self)

Enables a PWM channel
Source§

fn get_duty(&self) -> u16

Returns the current duty cycle
Source§

fn get_max_duty(&self) -> u16

Returns the maximum duty cycle value
Source§

fn set_duty(&mut self, duty: u16)

Sets a new duty cycle
Source§

impl PwmPin for Pwm<TIM2, C4>

Source§

type Duty = u16

Type for the duty methods Read more
Source§

fn disable(&mut self)

Disables a PWM channel
Source§

fn enable(&mut self)

Enables a PWM channel
Source§

fn get_duty(&self) -> u16

Returns the current duty cycle
Source§

fn get_max_duty(&self) -> u16

Returns the maximum duty cycle value
Source§

fn set_duty(&mut self, duty: u16)

Sets a new duty cycle
Source§

impl PwmPin for Pwm<TIM3, C1>

Source§

type Duty = u16

Type for the duty methods Read more
Source§

fn disable(&mut self)

Disables a PWM channel
Source§

fn enable(&mut self)

Enables a PWM channel
Source§

fn get_duty(&self) -> u16

Returns the current duty cycle
Source§

fn get_max_duty(&self) -> u16

Returns the maximum duty cycle value
Source§

fn set_duty(&mut self, duty: u16)

Sets a new duty cycle
Source§

impl PwmPin for Pwm<TIM3, C2>

Source§

type Duty = u16

Type for the duty methods Read more
Source§

fn disable(&mut self)

Disables a PWM channel
Source§

fn enable(&mut self)

Enables a PWM channel
Source§

fn get_duty(&self) -> u16

Returns the current duty cycle
Source§

fn get_max_duty(&self) -> u16

Returns the maximum duty cycle value
Source§

fn set_duty(&mut self, duty: u16)

Sets a new duty cycle
Source§

impl PwmPin for Pwm<TIM3, C3>

Source§

type Duty = u16

Type for the duty methods Read more
Source§

fn disable(&mut self)

Disables a PWM channel
Source§

fn enable(&mut self)

Enables a PWM channel
Source§

fn get_duty(&self) -> u16

Returns the current duty cycle
Source§

fn get_max_duty(&self) -> u16

Returns the maximum duty cycle value
Source§

fn set_duty(&mut self, duty: u16)

Sets a new duty cycle
Source§

impl PwmPin for Pwm<TIM3, C4>

Source§

type Duty = u16

Type for the duty methods Read more
Source§

fn disable(&mut self)

Disables a PWM channel
Source§

fn enable(&mut self)

Enables a PWM channel
Source§

fn get_duty(&self) -> u16

Returns the current duty cycle
Source§

fn get_max_duty(&self) -> u16

Returns the maximum duty cycle value
Source§

fn set_duty(&mut self, duty: u16)

Sets a new duty cycle
Source§

impl PwmPin for Pwm<TIM4, C1>

Source§

type Duty = u16

Type for the duty methods Read more
Source§

fn disable(&mut self)

Disables a PWM channel
Source§

fn enable(&mut self)

Enables a PWM channel
Source§

fn get_duty(&self) -> u16

Returns the current duty cycle
Source§

fn get_max_duty(&self) -> u16

Returns the maximum duty cycle value
Source§

fn set_duty(&mut self, duty: u16)

Sets a new duty cycle
Source§

impl PwmPin for Pwm<TIM4, C2>

Source§

type Duty = u16

Type for the duty methods Read more
Source§

fn disable(&mut self)

Disables a PWM channel
Source§

fn enable(&mut self)

Enables a PWM channel
Source§

fn get_duty(&self) -> u16

Returns the current duty cycle
Source§

fn get_max_duty(&self) -> u16

Returns the maximum duty cycle value
Source§

fn set_duty(&mut self, duty: u16)

Sets a new duty cycle
Source§

impl PwmPin for Pwm<TIM4, C3>

Source§

type Duty = u16

Type for the duty methods Read more
Source§

fn disable(&mut self)

Disables a PWM channel
Source§

fn enable(&mut self)

Enables a PWM channel
Source§

fn get_duty(&self) -> u16

Returns the current duty cycle
Source§

fn get_max_duty(&self) -> u16

Returns the maximum duty cycle value
Source§

fn set_duty(&mut self, duty: u16)

Sets a new duty cycle
Source§

impl PwmPin for Pwm<TIM4, C4>

Source§

type Duty = u16

Type for the duty methods Read more
Source§

fn disable(&mut self)

Disables a PWM channel
Source§

fn enable(&mut self)

Enables a PWM channel
Source§

fn get_duty(&self) -> u16

Returns the current duty cycle
Source§

fn get_max_duty(&self) -> u16

Returns the maximum duty cycle value
Source§

fn set_duty(&mut self, duty: u16)

Sets a new duty cycle
Source§

impl PwmPin for Pwm<TIM5, C1>

Source§

type Duty = u16

Type for the duty methods Read more
Source§

fn disable(&mut self)

Disables a PWM channel
Source§

fn enable(&mut self)

Enables a PWM channel
Source§

fn get_duty(&self) -> u16

Returns the current duty cycle
Source§

fn get_max_duty(&self) -> u16

Returns the maximum duty cycle value
Source§

fn set_duty(&mut self, duty: u16)

Sets a new duty cycle
Source§

impl PwmPin for Pwm<TIM5, C2>

Source§

type Duty = u16

Type for the duty methods Read more
Source§

fn disable(&mut self)

Disables a PWM channel
Source§

fn enable(&mut self)

Enables a PWM channel
Source§

fn get_duty(&self) -> u16

Returns the current duty cycle
Source§

fn get_max_duty(&self) -> u16

Returns the maximum duty cycle value
Source§

fn set_duty(&mut self, duty: u16)

Sets a new duty cycle
Source§

impl PwmPin for Pwm<TIM5, C3>

Source§

type Duty = u16

Type for the duty methods Read more
Source§

fn disable(&mut self)

Disables a PWM channel
Source§

fn enable(&mut self)

Enables a PWM channel
Source§

fn get_duty(&self) -> u16

Returns the current duty cycle
Source§

fn get_max_duty(&self) -> u16

Returns the maximum duty cycle value
Source§

fn set_duty(&mut self, duty: u16)

Sets a new duty cycle
Source§

impl PwmPin for Pwm<TIM5, C4>

Source§

type Duty = u16

Type for the duty methods Read more
Source§

fn disable(&mut self)

Disables a PWM channel
Source§

fn enable(&mut self)

Enables a PWM channel
Source§

fn get_duty(&self) -> u16

Returns the current duty cycle
Source§

fn get_max_duty(&self) -> u16

Returns the maximum duty cycle value
Source§

fn set_duty(&mut self, duty: u16)

Sets a new duty cycle

Auto Trait Implementations§

§

impl<TIM, CHANNEL> Freeze for Pwm<TIM, CHANNEL>

§

impl<TIM, CHANNEL> RefUnwindSafe for Pwm<TIM, CHANNEL>
where CHANNEL: RefUnwindSafe, TIM: RefUnwindSafe,

§

impl<TIM, CHANNEL> Send for Pwm<TIM, CHANNEL>
where CHANNEL: Send, TIM: Send,

§

impl<TIM, CHANNEL> Sync for Pwm<TIM, CHANNEL>
where CHANNEL: Sync, TIM: Sync,

§

impl<TIM, CHANNEL> Unpin for Pwm<TIM, CHANNEL>
where CHANNEL: Unpin, TIM: Unpin,

§

impl<TIM, CHANNEL> UnwindSafe for Pwm<TIM, CHANNEL>
where CHANNEL: UnwindSafe, TIM: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.