Type Alias esp32c6::mcpwm0::ch::carrier_cfg::R

source ·
pub type R = R<CARRIER_CFG_SPEC>;
Expand description

Register CARRIER_CFG reader

Aliased Type§

struct R { /* private fields */ }

Implementations§

source§

impl R

source

pub fn en(&self) -> EN_R

Bit 0 - When set, carrier0 function is enabled. When cleared, carrier0 is bypassed

source

pub fn prescale(&self) -> PRESCALE_R

Bits 1:4 - PWM carrier0 clock (PC_clk) prescale value. Period of PC_clk = period of PWM_clk * (PWM_CARRIER0_PRESCALE + 1)

source

pub fn duty(&self) -> DUTY_R

Bits 5:7 - carrier duty selection. Duty = PWM_CARRIER0_DUTY / 8

source

pub fn oshtwth(&self) -> OSHTWTH_R

Bits 8:11 - width of the first pulse in number of periods of the carrier

source

pub fn out_invert(&self) -> OUT_INVERT_R

Bit 12 - when set, invert the output of PWM0A and PWM0B for this submodule

source

pub fn in_invert(&self) -> IN_INVERT_R

Bit 13 - when set, invert the input of PWM0A and PWM0B for this submodule