Struct rk3399_pac::Pwm

source ·
pub struct Pwm { /* private fields */ }
Expand description

Pulse Width Modulation (PWM) Registers

Implementations§

source§

impl Pwm

source

pub const PTR: *const RegisterBlock = {0xff420000 as *const pwm::RegisterBlock}

Pointer to the register block

source

pub const fn ptr() -> *const RegisterBlock

Return the pointer to the register block

source

pub unsafe fn steal() -> Self

Steal an instance of this peripheral

§Safety

Ensure that the new instance of the peripheral cannot be used in a way that may race with any existing instances, for example by only accessing read-only or write-only registers, or by consuming the original peripheral and using critical sections to coordinate access between multiple new instances.

Additionally, other software such as HALs may rely on only one peripheral instance existing to ensure memory safety; ensure no stolen instances are passed to such software.

Methods from Deref<Target = RegisterBlock>§

source

pub fn pwm0_cnt(&self) -> &Pwm0Cnt

0x00 - PWM Channel 0 Counter Register

source

pub fn pwm0_period_hpr(&self) -> &Pwm0PeriodHpr

0x04 - PWM Channel 0 Period Register/High Polarity Capture Register

source

pub fn pwm0_duty_lpr(&self) -> &Pwm0DutyLpr

0x08 - PWM Channel 0 Duty Register/Low Polarity Capture Register

source

pub fn pwm0_ctrl(&self) -> &Pwm0Ctrl

0x0c - PWM Channel 0 Control Register

source

pub fn pwm1_cnt(&self) -> &Pwm1Cnt

0x10 - PWM Channel 1 Counter Register

source

pub fn pwm1_period_hpr(&self) -> &Pwm1PeriodHpr

0x14 - PWM Channel 1 Period Register/High Polarity Capture Register

source

pub fn pwm1_duty_lpr(&self) -> &Pwm1DutyLpr

0x18 - PWM Channel 1 Duty Register/Low Polarity Capture Register

source

pub fn pwm1_ctrl(&self) -> &Pwm1Ctrl

0x1c - PWM Channel 1 Control Register

source

pub fn pwm2_cnt(&self) -> &Pwm2Cnt

0x20 - PWM Channel 2 Counter Register

source

pub fn pwm2_period_hpr(&self) -> &Pwm2PeriodHpr

0x24 - PWM Channel 2 Period Register/High Polarity Capture Register

source

pub fn pwm2_duty_lpr(&self) -> &Pwm2DutyLpr

0x28 - PWM Channel 2 Duty Register/Low Polarity Capture Register

source

pub fn pwm2_ctrl(&self) -> &Pwm2Ctrl

0x2c - PWM Channel 2 Control Register

source

pub fn pwm3_cnt(&self) -> &Pwm3Cnt

0x30 - PWM Channel 3 Counter Register

source

pub fn pwm3_period_hpr(&self) -> &Pwm3PeriodHpr

0x34 - PWM Channel 3 Period Register/High Polarity Capture Register

source

pub fn pwm3_duty_lpr(&self) -> &Pwm3DutyLpr

0x38 - PWM Channel 3 Duty Register/Low Polarity Capture Register

source

pub fn pwm3_ctrl(&self) -> &Pwm3Ctrl

0x3c - PWM Channel 3 Control Register

source

pub fn intsts(&self) -> &Intsts

0x40 - Interrupt Status Register

source

pub fn int_en(&self) -> &IntEn

0x44 - Interrupt Enable Register

source

pub fn pwm_fifo_ctrl(&self) -> &PwmFifoCtrl

0x50 - PWM Channel 3 FIFO Mode Control Register

source

pub fn pwm_fifo_intsts(&self) -> &PwmFifoIntsts

0x54 - FIFO Interrupts Status Register

source

pub fn pwm_fifo_toutthr(&self) -> &PwmFifoToutthr

0x58 - FIFO Timeout Threshold Register

source

pub fn pwm_fifo(&self, n: usize) -> &PwmFifo

0x60..0x80 - FIFO Register

source

pub fn pwm_fifo_iter(&self) -> impl Iterator<Item = &PwmFifo>

Iterator for array of: 0x60..0x80 - FIFO Register

Trait Implementations§

source§

impl Debug for Pwm

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deref for Pwm

§

type Target = RegisterBlock

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl Send for Pwm

Auto Trait Implementations§

§

impl Freeze for Pwm

§

impl RefUnwindSafe for Pwm

§

impl !Sync for Pwm

§

impl Unpin for Pwm

§

impl UnwindSafe for Pwm

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.