Struct esp32s3_hal::pac::pwm0::timer2_sync::W
pub struct W(_);
Expand description
Register TIMER2_SYNC
writer
Implementations§
§impl W
impl W
pub fn timer2_synci_en(
&mut self
) -> BitWriterRaw<'_, u32, TIMER2_SYNC_SPEC, bool, BitM, 0>
pub fn timer2_synci_en(
&mut self
) -> BitWriterRaw<'_, u32, TIMER2_SYNC_SPEC, bool, BitM, 0>
Bit 0 - When set, timer reloading with phase on sync input event is enabled.
pub fn sw(&mut self) -> BitWriterRaw<'_, u32, TIMER2_SYNC_SPEC, bool, BitM, 1>
pub fn sw(&mut self) -> BitWriterRaw<'_, u32, TIMER2_SYNC_SPEC, bool, BitM, 1>
Bit 1 - Toggling this bit will trigger a software sync.
pub fn timer2_synco_sel(
&mut self
) -> FieldWriterRaw<'_, u32, TIMER2_SYNC_SPEC, u8, u8, Unsafe, 2, 2>
pub fn timer2_synco_sel(
&mut self
) -> FieldWriterRaw<'_, u32, TIMER2_SYNC_SPEC, u8, u8, Unsafe, 2, 2>
Bits 2:3 - PWM timer2 sync_out selection, 0: synci, 1: TEZ, 2: TEP, otherwise:sync out is software sync
pub fn timer2_phase(
&mut self
) -> FieldWriterRaw<'_, u32, TIMER2_SYNC_SPEC, u16, u16, Unsafe, 16, 4>
pub fn timer2_phase(
&mut self
) -> FieldWriterRaw<'_, u32, TIMER2_SYNC_SPEC, u16, u16, Unsafe, 16, 4>
Bits 4:19 - phase for timer reload on sync event
pub fn timer2_phase_direction(
&mut self
) -> BitWriterRaw<'_, u32, TIMER2_SYNC_SPEC, bool, BitM, 20>
pub fn timer2_phase_direction(
&mut self
) -> BitWriterRaw<'_, u32, TIMER2_SYNC_SPEC, bool, BitM, 20>
Bit 20 - Configure the PWM timer2’s direction when timer2 mode is up-down mode. 0: increase; 1: decrease.
Methods from Deref<Target = W<TIMER2_SYNC_SPEC>>§
pub unsafe fn bits(&mut self, bits: <REG as RegisterSpec>::Ux) -> &mut W<REG>
pub unsafe fn bits(&mut self, bits: <REG as RegisterSpec>::Ux) -> &mut W<REG>
Writes raw bits to the register.
Safety
Read datasheet or reference manual to find what values are allowed to pass.
Trait Implementations§
§impl From<W<TIMER2_SYNC_SPEC>> for W
impl From<W<TIMER2_SYNC_SPEC>> for W
§fn from(writer: W<TIMER2_SYNC_SPEC>) -> W
fn from(writer: W<TIMER2_SYNC_SPEC>) -> W
Converts to this type from the input type.