Struct esp32s3::MCPWM1

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

Motor Control Pulse-Width Modulation 1

Implementations§

source§

impl MCPWM1

source

pub const PTR: *const RegisterBlock = {0x6002c000 as *const mcpwm0::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 clk_cfg(&self) -> &CLK_CFG

0x00 - PWM clock prescaler register.

source

pub fn timer0_cfg0(&self) -> &TIMER0_CFG0

0x04 - PWM timer0 period and update method configuration register.

source

pub fn timer0_cfg1(&self) -> &TIMER0_CFG1

0x08 - PWM timer0 working mode and start/stop control configuration register.

source

pub fn timer0_sync(&self) -> &TIMER0_SYNC

0x0c - PWM timer0 sync function configuration register.

source

pub fn timer0_status(&self) -> &TIMER0_STATUS

0x10 - PWM timer0 status register.

source

pub fn timer1_cfg0(&self) -> &TIMER1_CFG0

0x14 - PWM timer1 period and update method configuration register.

source

pub fn timer1_cfg1(&self) -> &TIMER1_CFG1

0x18 - PWM timer1 working mode and start/stop control configuration register.

source

pub fn timer1_sync(&self) -> &TIMER1_SYNC

0x1c - PWM timer1 sync function configuration register.

source

pub fn timer1_status(&self) -> &TIMER1_STATUS

0x20 - PWM timer1 status register.

source

pub fn timer2_cfg0(&self) -> &TIMER2_CFG0

0x24 - PWM timer2 period and update method configuration register.

source

pub fn timer2_cfg1(&self) -> &TIMER2_CFG1

0x28 - PWM timer2 working mode and start/stop control configuration register.

source

pub fn timer2_sync(&self) -> &TIMER2_SYNC

0x2c - PWM timer2 sync function configuration register.

source

pub fn timer2_status(&self) -> &TIMER2_STATUS

0x30 - PWM timer2 status register.

source

pub fn timer_synci_cfg(&self) -> &TIMER_SYNCI_CFG

0x34 - Synchronization input selection for three PWM timers.

source

pub fn operator_timersel(&self) -> &OPERATOR_TIMERSEL

0x38 - Select specific timer for PWM operators.

source

pub fn cmpr0_cfg(&self) -> &CMPR0_CFG

0x3c - Transfer status and update method for time stamp registers A and B

source

pub fn cmpr0_value0(&self) -> &CMPR0_VALUE0

0x40 - Shadow register for register A.

source

pub fn cmpr0_value1(&self) -> &CMPR0_VALUE1

0x44 - Shadow register for register B.

source

pub fn gen0_cfg0(&self) -> &GEN0_CFG0

0x48 - Fault event T0 and T1 handling

source

pub fn gen0_force(&self) -> &GEN0_FORCE

0x4c - Permissives to force PWM0A and PWM0B outputs by software

source

pub fn gen0_a(&self) -> &GEN0_A

0x50 - Actions triggered by events on PWM0A

source

pub fn gen0_b(&self) -> &GEN0_B

0x54 - Actions triggered by events on PWM0B

source

pub fn db0_cfg(&self) -> &DB0_CFG

0x58 - dead time type selection and configuration

source

pub fn db0_fed_cfg(&self) -> &DB0_FED_CFG

0x5c - Shadow register for falling edge delay (FED).

source

pub fn db0_red_cfg(&self) -> &DB0_RED_CFG

0x60 - Shadow register for rising edge delay (RED).

source

pub fn chopper0_cfg(&self) -> &CHOPPER0_CFG

0x64 - Carrier enable and configuratoin

source

pub fn tz0_cfg0(&self) -> &TZ0_CFG0

0x68 - Actions on PWM0A and PWM0B trip events

source

pub fn tz0_cfg1(&self) -> &TZ0_CFG1

0x6c - Software triggers for fault handler actions

source

pub fn tz0_status(&self) -> &TZ0_STATUS

0x70 - Status of fault events.

source

pub fn cmpr1_cfg(&self) -> &CMPR1_CFG

0x74 - Transfer status and update method for time stamp registers A and B

source

pub fn cmpr1_value0(&self) -> &CMPR1_VALUE0

0x78 - Shadow register for register A.

source

pub fn cmpr1_value1(&self) -> &CMPR1_VALUE1

0x7c - Shadow register for register B.

source

pub fn gen1_cfg0(&self) -> &GEN1_CFG0

0x80 - Fault event T0 and T1 handling

source

pub fn gen1_force(&self) -> &GEN1_FORCE

0x84 - Permissives to force PWM1A and PWM1B outputs by software

source

pub fn gen1_a(&self) -> &GEN1_A

0x88 - Actions triggered by events on PWM1A

source

pub fn gen1_b(&self) -> &GEN1_B

0x8c - Actions triggered by events on PWM1B

source

pub fn db1_cfg(&self) -> &DB1_CFG

0x90 - dead time type selection and configuration

source

pub fn db1_fed_cfg(&self) -> &DB1_FED_CFG

0x94 - Shadow register for falling edge delay (FED).

source

pub fn db1_red_cfg(&self) -> &DB1_RED_CFG

0x98 - Shadow register for rising edge delay (RED).

source

pub fn chopper1_cfg(&self) -> &CHOPPER1_CFG

0x9c - Carrier enable and configuratoin

source

pub fn tz1_cfg0(&self) -> &TZ1_CFG0

0xa0 - Actions on PWM1A and PWM1B trip events

source

pub fn tz1_cfg1(&self) -> &TZ1_CFG1

0xa4 - Software triggers for fault handler actions

source

pub fn tz1_status(&self) -> &TZ1_STATUS

0xa8 - Status of fault events.

source

pub fn cmpr2_cfg(&self) -> &CMPR2_CFG

0xac - Transfer status and update method for time stamp registers A and B

source

pub fn cmpr2_value0(&self) -> &CMPR2_VALUE0

0xb0 - Shadow register for register A.

source

pub fn cmpr2_value1(&self) -> &CMPR2_VALUE1

0xb4 - Shadow register for register B.

source

pub fn gen2_cfg0(&self) -> &GEN2_CFG0

0xb8 - Fault event T0 and T1 handling

source

pub fn gen2_force(&self) -> &GEN2_FORCE

0xbc - Permissives to force PWM2A and PWM2B outputs by software

source

pub fn gen2_a(&self) -> &GEN2_A

0xc0 - Actions triggered by events on PWM2A

source

pub fn gen2_b(&self) -> &GEN2_B

0xc4 - Actions triggered by events on PWM2B

source

pub fn db2_cfg(&self) -> &DB2_CFG

0xc8 - dead time type selection and configuration

source

pub fn db2_fed_cfg(&self) -> &DB2_FED_CFG

0xcc - Shadow register for falling edge delay (FED).

source

pub fn db2_red_cfg(&self) -> &DB2_RED_CFG

0xd0 - Shadow register for rising edge delay (RED).

source

pub fn chopper2_cfg(&self) -> &CHOPPER2_CFG

0xd4 - Carrier enable and configuratoin

source

pub fn tz2_cfg0(&self) -> &TZ2_CFG0

0xd8 - Actions on PWM2A and PWM2B trip events

source

pub fn tz2_cfg1(&self) -> &TZ2_CFG1

0xdc - Software triggers for fault handler actions

source

pub fn tz2_status(&self) -> &TZ2_STATUS

0xe0 - Status of fault events.

source

pub fn fault_detect(&self) -> &FAULT_DETECT

0xe4 - Fault detection configuration and status

source

pub fn cap_timer_cfg(&self) -> &CAP_TIMER_CFG

0xe8 - Configure capture timer

source

pub fn cap_timer_phase(&self) -> &CAP_TIMER_PHASE

0xec - Phase for capture timer sync

source

pub fn cap_ch0_cfg(&self) -> &CAP_CH0_CFG

0xf0 - Capture channel 0 configuration and enable

source

pub fn cap_ch1_cfg(&self) -> &CAP_CH1_CFG

0xf4 - Capture channel 1 configuration and enable

source

pub fn cap_ch2_cfg(&self) -> &CAP_CH2_CFG

0xf8 - Capture channel 2 configuration and enable

source

pub fn cap_ch0(&self) -> &CAP_CH0

0xfc - Value of last capture on channel 0

source

pub fn cap_ch1(&self) -> &CAP_CH1

0x100 - Value of last capture on channel 1

source

pub fn cap_ch2(&self) -> &CAP_CH2

0x104 - Value of last capture on channel 2

source

pub fn cap_status(&self) -> &CAP_STATUS

0x108 - Edge of last capture trigger

source

pub fn update_cfg(&self) -> &UPDATE_CFG

0x10c - Enable update.

source

pub fn int_ena(&self) -> &INT_ENA

0x110 - Interrupt enable bits

source

pub fn int_raw(&self) -> &INT_RAW

0x114 - Raw interrupt status

source

pub fn int_st(&self) -> &INT_ST

0x118 - Masked interrupt status

source

pub fn int_clr(&self) -> &INT_CLR

0x11c - Interrupt clear bits

source

pub fn clk(&self) -> &CLK

0x120 - MCPWM APB configuration register

source

pub fn version(&self) -> &VERSION

0x124 - Version register.

Trait Implementations§

source§

impl Debug for MCPWM1

source§

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

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

impl Deref for MCPWM1

§

type Target = RegisterBlock

The resulting type after dereferencing.
source§

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

Dereferences the value.
source§

impl Send for MCPWM1

Auto Trait Implementations§

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.