Pwm

Struct Pwm 

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

Implementations§

Source§

impl<TIM> Pwm<TIM>

Source

pub fn bind_pin<PIN>(&self, pin: PIN) -> PwmPin<TIM, PIN::Channel>
where PIN: TimerPin<TIM>,

Source§

impl Pwm<TIM1>

Source

pub fn set_freq(&mut self, freq: Hertz)

Set the PWM frequency. Actual frequency may differ from requested due to precision of input clock. To check actual frequency, call freq.

Source

pub fn listen(&mut self)

Starts listening

Source

pub fn unlisten(&mut self)

Stops listening

Source

pub fn clear_irq(&mut self)

Clears interrupt flag

Source

pub fn reset(&mut self)

Resets counter value

Source

pub fn freq(&self) -> Hertz

Returns the currently configured frequency

Source§

impl Pwm<TIM3>

Source

pub fn set_freq(&mut self, freq: Hertz)

Set the PWM frequency. Actual frequency may differ from requested due to precision of input clock. To check actual frequency, call freq.

Source

pub fn listen(&mut self)

Starts listening

Source

pub fn unlisten(&mut self)

Stops listening

Source

pub fn clear_irq(&mut self)

Clears interrupt flag

Source

pub fn reset(&mut self)

Resets counter value

Source

pub fn freq(&self) -> Hertz

Returns the currently configured frequency

Source§

impl Pwm<TIM14>

Source

pub fn set_freq(&mut self, freq: Hertz)

Set the PWM frequency. Actual frequency may differ from requested due to precision of input clock. To check actual frequency, call freq.

Source

pub fn listen(&mut self)

Starts listening

Source

pub fn unlisten(&mut self)

Stops listening

Source

pub fn clear_irq(&mut self)

Clears interrupt flag

Source

pub fn reset(&mut self)

Resets counter value

Source

pub fn freq(&self) -> Hertz

Returns the currently configured frequency

Source§

impl Pwm<TIM16>

Source

pub fn set_freq(&mut self, freq: Hertz)

Set the PWM frequency. Actual frequency may differ from requested due to precision of input clock. To check actual frequency, call freq.

Source

pub fn listen(&mut self)

Starts listening

Source

pub fn unlisten(&mut self)

Stops listening

Source

pub fn clear_irq(&mut self)

Clears interrupt flag

Source

pub fn reset(&mut self)

Resets counter value

Source

pub fn freq(&self) -> Hertz

Returns the currently configured frequency

Source§

impl Pwm<TIM17>

Source

pub fn set_freq(&mut self, freq: Hertz)

Set the PWM frequency. Actual frequency may differ from requested due to precision of input clock. To check actual frequency, call freq.

Source

pub fn listen(&mut self)

Starts listening

Source

pub fn unlisten(&mut self)

Stops listening

Source

pub fn clear_irq(&mut self)

Clears interrupt flag

Source

pub fn reset(&mut self)

Resets counter value

Source

pub fn freq(&self) -> Hertz

Returns the currently configured frequency

Source§

impl Pwm<TIM2>

Source

pub fn set_freq(&mut self, freq: Hertz)

Set the PWM frequency. Actual frequency may differ from requested due to precision of input clock. To check actual frequency, call freq.

Source

pub fn listen(&mut self)

Starts listening

Source

pub fn unlisten(&mut self)

Stops listening

Source

pub fn clear_irq(&mut self)

Clears interrupt flag

Source

pub fn reset(&mut self)

Resets counter value

Source

pub fn freq(&self) -> Hertz

Returns the currently configured frequency

Source§

impl Pwm<TIM15>

Source

pub fn set_freq(&mut self, freq: Hertz)

Set the PWM frequency. Actual frequency may differ from requested due to precision of input clock. To check actual frequency, call freq.

Source

pub fn listen(&mut self)

Starts listening

Source

pub fn unlisten(&mut self)

Stops listening

Source

pub fn clear_irq(&mut self)

Clears interrupt flag

Source

pub fn reset(&mut self)

Resets counter value

Source

pub fn freq(&self) -> Hertz

Returns the currently configured frequency

Auto Trait Implementations§

§

impl<TIM> Freeze for Pwm<TIM>
where TIM: Freeze,

§

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

§

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

§

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

§

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

§

impl<TIM> UnwindSafe for Pwm<TIM>
where 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.