Struct MCPWM0

Source
pub struct MCPWM0 { /* private fields */ }

Implementations§

Source§

impl MCPWM0

Source

pub const PTR: *const <MCPWM0 as Deref>::Target = {0x60014000 as *const <esp32c6::MCPWM0 as core::ops::Deref>::Target}

Pointer to the register block

Source

pub unsafe fn steal() -> MCPWM0

Unsafely create an instance of this peripheral out of thin air.

§Safety

You must ensure that you’re only using one instance of this type at a time.

Source

pub const fn ptr() -> *const <MCPWM0 as Deref>::Target

Return the pointer to the register block

Methods from Deref<Target = RegisterBlock>§

Source

pub fn clk_cfg(&self) -> &Reg<CLK_CFG_SPEC>

0x00 - PWM clock prescaler register.

Source

pub fn timer0_cfg0(&self) -> &Reg<TIMER0_CFG0_SPEC>

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

Source

pub fn timer0_cfg1(&self) -> &Reg<TIMER0_CFG1_SPEC>

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

Source

pub fn timer0_sync(&self) -> &Reg<TIMER0_SYNC_SPEC>

0x0c - PWM timer0 sync function configuration register.

Source

pub fn timer0_status(&self) -> &Reg<TIMER0_STATUS_SPEC>

0x10 - PWM timer0 status register.

Source

pub fn timer1_cfg0(&self) -> &Reg<TIMER1_CFG0_SPEC>

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

Source

pub fn timer1_cfg1(&self) -> &Reg<TIMER1_CFG1_SPEC>

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

Source

pub fn timer1_sync(&self) -> &Reg<TIMER1_SYNC_SPEC>

0x1c - PWM timer1 sync function configuration register.

Source

pub fn timer1_status(&self) -> &Reg<TIMER1_STATUS_SPEC>

0x20 - PWM timer1 status register.

Source

pub fn timer2_cfg0(&self) -> &Reg<TIMER2_CFG0_SPEC>

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

Source

pub fn timer2_cfg1(&self) -> &Reg<TIMER2_CFG1_SPEC>

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

Source

pub fn timer2_sync(&self) -> &Reg<TIMER2_SYNC_SPEC>

0x2c - PWM timer2 sync function configuration register.

Source

pub fn timer2_status(&self) -> &Reg<TIMER2_STATUS_SPEC>

0x30 - PWM timer2 status register.

Source

pub fn timer_synci_cfg(&self) -> &Reg<TIMER_SYNCI_CFG_SPEC>

0x34 - Synchronization input selection for three PWM timers.

Source

pub fn operator_timersel(&self) -> &Reg<OPERATOR_TIMERSEL_SPEC>

0x38 - Select specific timer for PWM operators.

Source

pub fn gen0_stmp_cfg(&self) -> &Reg<GEN0_STMP_CFG_SPEC>

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

Source

pub fn gen0_tstmp_a(&self) -> &Reg<GEN0_TSTMP_A_SPEC>

0x40 - Shadow register for register A.

Source

pub fn gen0_tstmp_b(&self) -> &Reg<GEN0_TSTMP_B_SPEC>

0x44 - Shadow register for register B.

Source

pub fn gen0_cfg0(&self) -> &Reg<GEN0_CFG0_SPEC>

0x48 - Fault event T0 and T1 handling

Source

pub fn gen0_force(&self) -> &Reg<GEN0_FORCE_SPEC>

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

Source

pub fn gen0_a(&self) -> &Reg<GEN0_A_SPEC>

0x50 - Actions triggered by events on PWM0A

Source

pub fn gen0_b(&self) -> &Reg<GEN0_B_SPEC>

0x54 - Actions triggered by events on PWM0B

Source

pub fn dt0_cfg(&self) -> &Reg<DT0_CFG_SPEC>

0x58 - dead time type selection and configuration

Source

pub fn dt0_fed_cfg(&self) -> &Reg<DT0_FED_CFG_SPEC>

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

Source

pub fn dt0_red_cfg(&self) -> &Reg<DT0_RED_CFG_SPEC>

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

Source

pub fn carrier0_cfg(&self) -> &Reg<CARRIER0_CFG_SPEC>

0x64 - Carrier enable and configuratoin

Source

pub fn fh0_cfg0(&self) -> &Reg<FH0_CFG0_SPEC>

0x68 - Actions on PWM0A and PWM0B trip events

Source

pub fn fh0_cfg1(&self) -> &Reg<FH0_CFG1_SPEC>

0x6c - Software triggers for fault handler actions

Source

pub fn fh0_status(&self) -> &Reg<FH0_STATUS_SPEC>

0x70 - Status of fault events.

Source

pub fn gen1_stmp_cfg(&self) -> &Reg<GEN1_STMP_CFG_SPEC>

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

Source

pub fn gen1_tstmp_a(&self) -> &Reg<GEN1_TSTMP_A_SPEC>

0x78 - Shadow register for register A.

Source

pub fn gen1_tstmp_b(&self) -> &Reg<GEN1_TSTMP_B_SPEC>

0x7c - Shadow register for register B.

Source

pub fn gen1_cfg0(&self) -> &Reg<GEN1_CFG0_SPEC>

0x80 - Fault event T0 and T1 handling

Source

pub fn gen1_force(&self) -> &Reg<GEN1_FORCE_SPEC>

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

Source

pub fn gen1_a(&self) -> &Reg<GEN1_A_SPEC>

0x88 - Actions triggered by events on PWM1A

Source

pub fn gen1_b(&self) -> &Reg<GEN1_B_SPEC>

0x8c - Actions triggered by events on PWM1B

Source

pub fn dt1_cfg(&self) -> &Reg<DT1_CFG_SPEC>

0x90 - dead time type selection and configuration

Source

pub fn dt1_fed_cfg(&self) -> &Reg<DT1_FED_CFG_SPEC>

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

Source

pub fn dt1_red_cfg(&self) -> &Reg<DT1_RED_CFG_SPEC>

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

Source

pub fn carrier1_cfg(&self) -> &Reg<CARRIER1_CFG_SPEC>

0x9c - Carrier enable and configuratoin

Source

pub fn fh1_cfg0(&self) -> &Reg<FH1_CFG0_SPEC>

0xa0 - Actions on PWM1A and PWM1B trip events

Source

pub fn fh1_cfg1(&self) -> &Reg<FH1_CFG1_SPEC>

0xa4 - Software triggers for fault handler actions

Source

pub fn fh1_status(&self) -> &Reg<FH1_STATUS_SPEC>

0xa8 - Status of fault events.

Source

pub fn gen2_stmp_cfg(&self) -> &Reg<GEN2_STMP_CFG_SPEC>

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

Source

pub fn gen2_tstmp_a(&self) -> &Reg<GEN2_TSTMP_A_SPEC>

0xb0 - Shadow register for register A.

Source

pub fn gen2_tstmp_b(&self) -> &Reg<GEN2_TSTMP_B_SPEC>

0xb4 - Shadow register for register B.

Source

pub fn gen2_cfg0(&self) -> &Reg<GEN2_CFG0_SPEC>

0xb8 - Fault event T0 and T1 handling

Source

pub fn gen2_force(&self) -> &Reg<GEN2_FORCE_SPEC>

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

Source

pub fn gen2_a(&self) -> &Reg<GEN2_A_SPEC>

0xc0 - Actions triggered by events on PWM2A

Source

pub fn gen2_b(&self) -> &Reg<GEN2_B_SPEC>

0xc4 - Actions triggered by events on PWM2B

Source

pub fn dt2_cfg(&self) -> &Reg<DT2_CFG_SPEC>

0xc8 - dead time type selection and configuration

Source

pub fn dt2_fed_cfg(&self) -> &Reg<DT2_FED_CFG_SPEC>

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

Source

pub fn dt2_red_cfg(&self) -> &Reg<DT2_RED_CFG_SPEC>

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

Source

pub fn carrier2_cfg(&self) -> &Reg<CARRIER2_CFG_SPEC>

0xd4 - Carrier enable and configuratoin

Source

pub fn fh2_cfg0(&self) -> &Reg<FH2_CFG0_SPEC>

0xd8 - Actions on PWM2A and PWM2B trip events

Source

pub fn fh2_cfg1(&self) -> &Reg<FH2_CFG1_SPEC>

0xdc - Software triggers for fault handler actions

Source

pub fn fh2_status(&self) -> &Reg<FH2_STATUS_SPEC>

0xe0 - Status of fault events.

Source

pub fn fault_detect(&self) -> &Reg<FAULT_DETECT_SPEC>

0xe4 - Fault detection configuration and status

Source

pub fn cap_timer_cfg(&self) -> &Reg<CAP_TIMER_CFG_SPEC>

0xe8 - Configure capture timer

Source

pub fn cap_timer_phase(&self) -> &Reg<CAP_TIMER_PHASE_SPEC>

0xec - Phase for capture timer sync

Source

pub fn cap_ch0_cfg(&self) -> &Reg<CAP_CH0_CFG_SPEC>

0xf0 - Capture channel 0 configuration and enable

Source

pub fn cap_ch1_cfg(&self) -> &Reg<CAP_CH1_CFG_SPEC>

0xf4 - Capture channel 1 configuration and enable

Source

pub fn cap_ch2_cfg(&self) -> &Reg<CAP_CH2_CFG_SPEC>

0xf8 - Capture channel 2 configuration and enable

Source

pub fn cap_ch0(&self) -> &Reg<CAP_CH0_SPEC>

0xfc - ch0 capture value status register

Source

pub fn cap_ch1(&self) -> &Reg<CAP_CH1_SPEC>

0x100 - ch1 capture value status register

Source

pub fn cap_ch2(&self) -> &Reg<CAP_CH2_SPEC>

0x104 - ch2 capture value status register

Source

pub fn cap_status(&self) -> &Reg<CAP_STATUS_SPEC>

0x108 - Edge of last capture trigger

Source

pub fn update_cfg(&self) -> &Reg<UPDATE_CFG_SPEC>

0x10c - Enable update.

Source

pub fn int_ena(&self) -> &Reg<INT_ENA_SPEC>

0x110 - Interrupt enable bits

Source

pub fn int_raw(&self) -> &Reg<INT_RAW_SPEC>

0x114 - Raw interrupt status

Source

pub fn int_st(&self) -> &Reg<INT_ST_SPEC>

0x118 - Masked interrupt status

Source

pub fn int_clr(&self) -> &Reg<INT_CLR_SPEC>

0x11c - Interrupt clear bits

Source

pub fn evt_en(&self) -> &Reg<EVT_EN_SPEC>

0x120 - MCPWM event enable register

Source

pub fn task_en(&self) -> &Reg<TASK_EN_SPEC>

0x124 - MCPWM task enable register

Source

pub fn clk(&self) -> &Reg<CLK_SPEC>

0x128 - MCPWM APB configuration register

Source

pub fn version(&self) -> &Reg<VERSION_SPEC>

0x12c - Version register.

Trait Implementations§

Source§

impl Debug for MCPWM0

Source§

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

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

impl Deref for MCPWM0

Source§

type Target = <MCPWM0 as Deref>::Target

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<MCPWM0 as Deref>::Target

Dereferences the value.
Source§

impl DerefMut for MCPWM0

Source§

fn deref_mut(&mut self) -> &mut <MCPWM0 as Deref>::Target

Mutably dereferences the value.
Source§

impl Peripheral for MCPWM0

Source§

type P = MCPWM0

Peripheral singleton type
Source§

unsafe fn clone_unchecked(&mut self) -> <MCPWM0 as Peripheral>::P

Unsafely clone (duplicate) a peripheral singleton. Read more
Source§

fn into_ref<'a>(self) -> PeripheralRef<'a, Self::P>
where Self: 'a,

Convert a value into a PeripheralRef. Read more
Source§

impl PwmPeripheral for MCPWM0

Source§

fn enable()

Enable peripheral
Source§

fn block() -> *const RegisterBlock

Get a pointer to the peripheral RegisterBlock
Source§

fn output_signal<const OP: u8, const IS_A: bool>() -> OutputSignal

Get operator GPIO mux output signal

Auto Trait Implementations§

§

impl Freeze for MCPWM0

§

impl RefUnwindSafe for MCPWM0

§

impl Send for MCPWM0

§

impl Sync for MCPWM0

§

impl Unpin for MCPWM0

§

impl UnwindSafe for MCPWM0

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

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

Source§

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>,

Source§

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.