Type Alias esp32c2::ledc::ch_conf1::W

source ·
pub type W = W<CH_CONF1_SPEC>;
Expand description

Register CH%s_CONF1 writer

Aliased Type§

struct W { /* private fields */ }

Implementations§

source§

impl W

source

pub fn duty_scale(&mut self) -> DUTY_SCALE_W<'_, CH_CONF1_SPEC>

Bits 0:9 - This register is used to configure the changing step scale of duty on channel %s.

source

pub fn duty_cycle(&mut self) -> DUTY_CYCLE_W<'_, CH_CONF1_SPEC>

Bits 10:19 - The duty will change every LEDC_DUTY_CYCLE_CH%s on channel %s.

source

pub fn duty_num(&mut self) -> DUTY_NUM_W<'_, CH_CONF1_SPEC>

Bits 20:29 - This register is used to control the number of times the duty cycle will be changed.

source

pub fn duty_inc(&mut self) -> DUTY_INC_W<'_, CH_CONF1_SPEC>

Bit 30 - This register is used to increase or decrease the duty of output signal on channel %s. 1: Increase; 0: Decrease.

source

pub fn duty_start(&mut self) -> DUTY_START_W<'_, CH_CONF1_SPEC>

Bit 31 - Other configured fields in LEDC_CH%s_CONF1_REG will start to take effect when this bit is set to 1.

source

pub unsafe fn bits(&mut self, bits: u32) -> &mut Self

Writes raw bits to the register.

§Safety

Passing incorrect value can cause undefined behaviour. See reference manual