embassy-stm32

Crates

git

Versions

stm32l452ce

Flavors

Struct OnePulseChannel

Source
pub struct OnePulseChannel<'d, T: GeneralInstance4Channel> { /* private fields */ }
Expand description

A single channel of a one pulse-configured timer, obtained from OnePulse::split,OnePulse::channel, OnePulse::ch1, etc.

It is not possible to change the pulse end tick because the end tick configuration is shared with all four channels.

Implementations§

Source§

impl<'d, T: GeneralInstance4Channel> OnePulseChannel<'d, T>

Source

pub fn pulse_end(&self) -> u32

Get the end of the pulse in ticks from the trigger.

Source

pub fn pulse_width(&mut self) -> u32

Get the width of the pulse in ticks.

Source

pub fn pulse_delay(&mut self) -> u32

Get the start of the pulse in ticks from the trigger.

Source

pub fn set_pulse_delay(&mut self, delay: u32)

Set the start of the pulse in ticks from the trigger.

Source

pub fn set_pulse_width(&mut self, width: u32)

Set the pulse width in ticks.

Source

pub async fn wait_for_pulse_start(&mut self)

Waits until the trigger and following delay has passed.

Auto Trait Implementations§

§

impl<'d, T> Freeze for OnePulseChannel<'d, T>
where T: Freeze,

§

impl<'d, T> RefUnwindSafe for OnePulseChannel<'d, T>
where T: RefUnwindSafe,

§

impl<'d, T> Send for OnePulseChannel<'d, T>
where T: Send,

§

impl<'d, T> Sync for OnePulseChannel<'d, T>
where T: Sync,

§

impl<'d, T> Unpin for OnePulseChannel<'d, T>
where T: Unpin,

§

impl<'d, T> !UnwindSafe for OnePulseChannel<'d, T>

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.