Struct esp32_hal::mcpwm::operator::PwmActions
source · 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>
impl<const IS_A: bool> PwmActions<IS_A>
sourcepub const UP_ACTIVE_HIGH: PwmActions<IS_A> = _
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.
sourcepub const UP_DOWN_ACTIVE_HIGH: PwmActions<IS_A> = _
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.
sourcepub const fn empty() -> PwmActions<IS_A>
pub const fn empty() -> PwmActions<IS_A>
PwmActions
with no UpdateAction
s set
sourcepub const fn on_up_counting_timer_equals_zero(
self,
action: UpdateAction
) -> PwmActions<IS_A>
pub const fn on_up_counting_timer_equals_zero( self, action: UpdateAction ) -> PwmActions<IS_A>
Choose an UpdateAction
for an UTEZ
event
sourcepub const fn on_up_counting_timer_equals_period(
self,
action: UpdateAction
) -> PwmActions<IS_A>
pub const fn on_up_counting_timer_equals_period( self, action: UpdateAction ) -> PwmActions<IS_A>
Choose an UpdateAction
for an UTEP
event
sourcepub const fn on_up_counting_timer_equals_timestamp(
self,
action: UpdateAction
) -> PwmActions<IS_A>
pub const fn on_up_counting_timer_equals_timestamp( self, action: UpdateAction ) -> PwmActions<IS_A>
Choose an UpdateAction
for an UTEA
/UTEB
event
sourcepub const fn on_up_counting_timer_equals_ch_timestamp<const CH_A: bool>(
self,
action: UpdateAction
) -> PwmActions<IS_A>
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
sourcepub const fn on_down_counting_timer_equals_zero(
self,
action: UpdateAction
) -> PwmActions<IS_A>
pub const fn on_down_counting_timer_equals_zero( self, action: UpdateAction ) -> PwmActions<IS_A>
Choose an UpdateAction
for an DTEZ
event
sourcepub const fn on_down_counting_timer_equals_period(
self,
action: UpdateAction
) -> PwmActions<IS_A>
pub const fn on_down_counting_timer_equals_period( self, action: UpdateAction ) -> PwmActions<IS_A>
Choose an UpdateAction
for an DTEP
event
sourcepub const fn on_down_counting_timer_equals_timestamp(
self,
action: UpdateAction
) -> PwmActions<IS_A>
pub const fn on_down_counting_timer_equals_timestamp( self, action: UpdateAction ) -> PwmActions<IS_A>
Choose an UpdateAction
for an DTEA
/DTEB
event
sourcepub const fn on_down_counting_timer_equals_ch_timestamp<const CH_A: bool>(
self,
action: UpdateAction
) -> PwmActions<IS_A>
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