pub struct PwmActions<const IS_A: bool>(/* private fields */);
Expand description

Settings for what actions should be taken on timing events

§Note:

The hardware supports using a timestamp A event to trigger an action on output B or vice versa. For clearer ownership semantics this HAL does not support such configurations.

Implementations§

source§

impl<const IS_A: bool> PwmActions<IS_A>

source

pub const UP_ACTIVE_HIGH: PwmActions<IS_A> = _

Using this setting together with a timer configured with PwmWorkingMode::Increase will set the output high for a duration proportional to the set timestamp.

source

pub const UP_DOWN_ACTIVE_HIGH: PwmActions<IS_A> = _

Using this setting together with a timer configured with PwmWorkingMode::UpDown will set the output high for a duration proportional to the set timestamp.

source

pub const fn empty() -> PwmActions<IS_A>

PwmActions with no UpdateActions set

source

pub const fn on_up_counting_timer_equals_zero( self, action: UpdateAction ) -> PwmActions<IS_A>

Choose an UpdateAction for an UTEZ event

source

pub const fn on_up_counting_timer_equals_period( self, action: UpdateAction ) -> PwmActions<IS_A>

Choose an UpdateAction for an UTEP event

source

pub const fn on_up_counting_timer_equals_timestamp( self, action: UpdateAction ) -> PwmActions<IS_A>

Choose an UpdateAction for an UTEA/UTEB event

source

pub const fn on_up_counting_timer_equals_ch_timestamp<const CH_A: bool>( self, action: UpdateAction ) -> PwmActions<IS_A>

Choose an UpdateAction for an UTEA/UTEB event where you can specify which of the A/B to use

source

pub const fn on_down_counting_timer_equals_zero( self, action: UpdateAction ) -> PwmActions<IS_A>

Choose an UpdateAction for an DTEZ event

source

pub const fn on_down_counting_timer_equals_period( self, action: UpdateAction ) -> PwmActions<IS_A>

Choose an UpdateAction for an DTEP event

source

pub const fn on_down_counting_timer_equals_timestamp( self, action: UpdateAction ) -> PwmActions<IS_A>

Choose an UpdateAction for an DTEA/DTEB event

source

pub const fn on_down_counting_timer_equals_ch_timestamp<const CH_A: bool>( self, action: UpdateAction ) -> PwmActions<IS_A>

Choose an UpdateAction for an DTEA/DTEB event where you can specify which of the A/B to use

Auto Trait Implementations§

§

impl<const IS_A: bool> RefUnwindSafe for PwmActions<IS_A>

§

impl<const IS_A: bool> Send for PwmActions<IS_A>

§

impl<const IS_A: bool> Sync for PwmActions<IS_A>

§

impl<const IS_A: bool> Unpin for PwmActions<IS_A>

§

impl<const IS_A: bool> UnwindSafe for PwmActions<IS_A>

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>,

§

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>,

§

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.