Struct rk3399_pac::Pwm
source · pub struct Pwm { /* private fields */ }
Expand description
Pulse Width Modulation (PWM) Registers
Implementations§
source§impl Pwm
impl Pwm
sourcepub const PTR: *const RegisterBlock = {0xff420000 as *const pwm::RegisterBlock}
pub const PTR: *const RegisterBlock = {0xff420000 as *const pwm::RegisterBlock}
Pointer to the register block
sourcepub const fn ptr() -> *const RegisterBlock
pub const fn ptr() -> *const RegisterBlock
Return the pointer to the register block
sourcepub unsafe fn steal() -> Self
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>§
sourcepub fn pwm0_period_hpr(&self) -> &Pwm0PeriodHpr
pub fn pwm0_period_hpr(&self) -> &Pwm0PeriodHpr
0x04 - PWM Channel 0 Period Register/High Polarity Capture Register
sourcepub fn pwm0_duty_lpr(&self) -> &Pwm0DutyLpr
pub fn pwm0_duty_lpr(&self) -> &Pwm0DutyLpr
0x08 - PWM Channel 0 Duty Register/Low Polarity Capture Register
sourcepub fn pwm1_period_hpr(&self) -> &Pwm1PeriodHpr
pub fn pwm1_period_hpr(&self) -> &Pwm1PeriodHpr
0x14 - PWM Channel 1 Period Register/High Polarity Capture Register
sourcepub fn pwm1_duty_lpr(&self) -> &Pwm1DutyLpr
pub fn pwm1_duty_lpr(&self) -> &Pwm1DutyLpr
0x18 - PWM Channel 1 Duty Register/Low Polarity Capture Register
sourcepub fn pwm2_period_hpr(&self) -> &Pwm2PeriodHpr
pub fn pwm2_period_hpr(&self) -> &Pwm2PeriodHpr
0x24 - PWM Channel 2 Period Register/High Polarity Capture Register
sourcepub fn pwm2_duty_lpr(&self) -> &Pwm2DutyLpr
pub fn pwm2_duty_lpr(&self) -> &Pwm2DutyLpr
0x28 - PWM Channel 2 Duty Register/Low Polarity Capture Register
sourcepub fn pwm3_period_hpr(&self) -> &Pwm3PeriodHpr
pub fn pwm3_period_hpr(&self) -> &Pwm3PeriodHpr
0x34 - PWM Channel 3 Period Register/High Polarity Capture Register
sourcepub fn pwm3_duty_lpr(&self) -> &Pwm3DutyLpr
pub fn pwm3_duty_lpr(&self) -> &Pwm3DutyLpr
0x38 - PWM Channel 3 Duty Register/Low Polarity Capture Register
sourcepub fn pwm_fifo_ctrl(&self) -> &PwmFifoCtrl
pub fn pwm_fifo_ctrl(&self) -> &PwmFifoCtrl
0x50 - PWM Channel 3 FIFO Mode Control Register
sourcepub fn pwm_fifo_intsts(&self) -> &PwmFifoIntsts
pub fn pwm_fifo_intsts(&self) -> &PwmFifoIntsts
0x54 - FIFO Interrupts Status Register
sourcepub fn pwm_fifo_toutthr(&self) -> &PwmFifoToutthr
pub fn pwm_fifo_toutthr(&self) -> &PwmFifoToutthr
0x58 - FIFO Timeout Threshold Register
sourcepub fn pwm_fifo_iter(&self) -> impl Iterator<Item = &PwmFifo>
pub fn pwm_fifo_iter(&self) -> impl Iterator<Item = &PwmFifo>
Iterator for array of: 0x60..0x80 - FIFO Register