Type Alias esp32c6::mcpwm0::cap_ch_cfg::W
source · pub type W = W<CAP_CH_CFG_SPEC>;
Expand description
Register CAP_CH%s_CFG
writer
Aliased Type§
struct W { /* private fields */ }
Implementations§
source§impl W
impl W
sourcepub fn en(&mut self) -> EN_W<'_, CAP_CH_CFG_SPEC>
pub fn en(&mut self) -> EN_W<'_, CAP_CH_CFG_SPEC>
Bit 0 - When set, capture on channel 0 is enabled
sourcepub fn mode(&mut self) -> MODE_W<'_, CAP_CH_CFG_SPEC>
pub fn mode(&mut self) -> MODE_W<'_, CAP_CH_CFG_SPEC>
Bits 1:2 - Edge of capture on channel 0 after prescaling. When bit0 is set to 1: enable capture on the negative edge, When bit1 is set to 1: enable capture on the positive edge.
sourcepub fn prescale(&mut self) -> PRESCALE_W<'_, CAP_CH_CFG_SPEC>
pub fn prescale(&mut self) -> PRESCALE_W<'_, CAP_CH_CFG_SPEC>
Bits 3:10 - Value of prescaling on possitive edge of CAP0. Prescale value = PWM_CAP0_PRESCALE + 1
sourcepub fn in_invert(&mut self) -> IN_INVERT_W<'_, CAP_CH_CFG_SPEC>
pub fn in_invert(&mut self) -> IN_INVERT_W<'_, CAP_CH_CFG_SPEC>
Bit 11 - when set, CAP0 form GPIO matrix is inverted before prescale
sourcepub fn sw(&mut self) -> SW_W<'_, CAP_CH_CFG_SPEC>
pub fn sw(&mut self) -> SW_W<'_, CAP_CH_CFG_SPEC>
Bit 12 - Write 1 will trigger a software forced capture on channel 0