Struct rp2040_pac2::pwm::regs::Ch0Csr[][src]

#[repr(transparent)]pub struct Ch0Csr(pub u32);

Control and status register

Implementations

impl Ch0Csr[src]

pub const fn ph_adv(&self) -> bool[src]

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)

pub fn set_ph_adv(&mut self, val: bool)[src]

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)

pub const fn ph_ret(&self) -> bool[src]

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.

pub fn set_ph_ret(&mut self, val: bool)[src]

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.

pub const fn divmode(&self) -> Divmode[src]

pub fn set_divmode(&mut self, val: Divmode)[src]

pub const fn b_inv(&self) -> bool[src]

Invert output B

pub fn set_b_inv(&mut self, val: bool)[src]

Invert output B

pub const fn a_inv(&self) -> bool[src]

Invert output A

pub fn set_a_inv(&mut self, val: bool)[src]

Invert output A

pub const fn ph_correct(&self) -> bool[src]

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

pub fn set_ph_correct(&mut self, val: bool)[src]

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

pub const fn en(&self) -> bool[src]

Enable the PWM channel.

pub fn set_en(&mut self, val: bool)[src]

Enable the PWM channel.

Trait Implementations

impl Clone for Ch0Csr[src]

impl Copy for Ch0Csr[src]

impl Default for Ch0Csr[src]

Auto Trait Implementations

impl Send for Ch0Csr

impl Sync for Ch0Csr

impl Unpin for Ch0Csr

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.