Struct esp32c2_hal::pac::ledc::ch_conf1::W
pub struct W(_);
Expand description
Register CH%s_CONF1
writer
Implementations
impl W
impl W
pub fn duty_scale(
&mut self
) -> FieldWriterRaw<'_, u32, CH_CONF1_SPEC, u16, u16, Unsafe, 10, 0>
pub fn duty_scale(
&mut self
) -> FieldWriterRaw<'_, u32, CH_CONF1_SPEC, u16, u16, Unsafe, 10, 0>
Bits 0:9 - This register is used to configure the changing step scale of duty on channel %s.
pub fn duty_cycle(
&mut self
) -> FieldWriterRaw<'_, u32, CH_CONF1_SPEC, u16, u16, Unsafe, 10, 10>
pub fn duty_cycle(
&mut self
) -> FieldWriterRaw<'_, u32, CH_CONF1_SPEC, u16, u16, Unsafe, 10, 10>
Bits 10:19 - The duty will change every LEDC_DUTY_CYCLE_CH%s on channel %s.
pub fn duty_num(
&mut self
) -> FieldWriterRaw<'_, u32, CH_CONF1_SPEC, u16, u16, Unsafe, 10, 20>
pub fn duty_num(
&mut self
) -> FieldWriterRaw<'_, u32, CH_CONF1_SPEC, u16, u16, Unsafe, 10, 20>
Bits 20:29 - This register is used to control the number of times the duty cycle will be changed.
pub fn duty_inc(
&mut self
) -> BitWriterRaw<'_, u32, CH_CONF1_SPEC, bool, BitM, 30>
pub fn duty_inc(
&mut self
) -> BitWriterRaw<'_, u32, CH_CONF1_SPEC, bool, BitM, 30>
Bit 30 - This register is used to increase or decrease the duty of output signal on channel %s. 1: Increase; 0: Decrease.
pub fn duty_start(
&mut self
) -> BitWriterRaw<'_, u32, CH_CONF1_SPEC, bool, BitM, 31>
pub fn duty_start(
&mut self
) -> BitWriterRaw<'_, u32, CH_CONF1_SPEC, bool, BitM, 31>
Bit 31 - Other configured fields in LEDC_CH%s_CONF1_REG will start to take effect when this bit is set to 1.
Methods from Deref<Target = W<CH_CONF1_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<CH_CONF1_SPEC>> for W
impl From<W<CH_CONF1_SPEC>> for W
fn from(writer: W<CH_CONF1_SPEC>) -> W
fn from(writer: W<CH_CONF1_SPEC>) -> W
Converts to this type from the input type.
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more