Type Alias rp2040_pac::pwm::ch::csr::R

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

Register CSR reader

Aliased Type§

struct R { /* private fields */ }

Implementations§

source§

impl R

source

pub fn en(&self) -> EN_R

Bit 0 - Enable the PWM channel.

source

pub fn ph_correct(&self) -> PH_CORRECT_R

Bit 1 - 1: Enable phase-correct modulation. 0: Trailing-edge

source

pub fn a_inv(&self) -> A_INV_R

Bit 2 - Invert output A

source

pub fn b_inv(&self) -> B_INV_R

Bit 3 - Invert output B

source

pub fn divmode(&self) -> DIVMODE_R

Bits 4:5

source

pub fn ph_ret(&self) -> PH_RET_R

Bit 6 - Retard the phase of the counter by 1 count, while it is running.
Self-clearing. Write a 1, and poll until low. Counter must be running.

source

pub fn ph_adv(&self) -> PH_ADV_R

Bit 7 - Advance the phase of the counter by 1 count, while it is running.
Self-clearing. Write a 1, and poll until low. Counter must be running
at less than full speed (div_int + div_frac / 16 > 1)