pub struct MCPWM0 { /* private fields */ }
Expand description
Motor Control Pulse-Width Modulation 0
Implementations§
source§impl MCPWM0
impl MCPWM0
sourcepub const PTR: *const RegisterBlock = {0x60014000 as *const mcpwm0::RegisterBlock}
pub const PTR: *const RegisterBlock = {0x60014000 as *const mcpwm0::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 timer0_cfg0(&self) -> &TIMER0_CFG0
pub fn timer0_cfg0(&self) -> &TIMER0_CFG0
0x04 - PWM timer0 period and update method configuration register.
sourcepub fn timer0_cfg1(&self) -> &TIMER0_CFG1
pub fn timer0_cfg1(&self) -> &TIMER0_CFG1
0x08 - PWM timer0 working mode and start/stop control configuration register.
sourcepub fn timer0_sync(&self) -> &TIMER0_SYNC
pub fn timer0_sync(&self) -> &TIMER0_SYNC
0x0c - PWM timer0 sync function configuration register.
sourcepub fn timer0_status(&self) -> &TIMER0_STATUS
pub fn timer0_status(&self) -> &TIMER0_STATUS
0x10 - PWM timer0 status register.
sourcepub fn timer1_cfg0(&self) -> &TIMER1_CFG0
pub fn timer1_cfg0(&self) -> &TIMER1_CFG0
0x14 - PWM timer1 period and update method configuration register.
sourcepub fn timer1_cfg1(&self) -> &TIMER1_CFG1
pub fn timer1_cfg1(&self) -> &TIMER1_CFG1
0x18 - PWM timer1 working mode and start/stop control configuration register.
sourcepub fn timer1_sync(&self) -> &TIMER1_SYNC
pub fn timer1_sync(&self) -> &TIMER1_SYNC
0x1c - PWM timer1 sync function configuration register.
sourcepub fn timer1_status(&self) -> &TIMER1_STATUS
pub fn timer1_status(&self) -> &TIMER1_STATUS
0x20 - PWM timer1 status register.
sourcepub fn timer2_cfg0(&self) -> &TIMER2_CFG0
pub fn timer2_cfg0(&self) -> &TIMER2_CFG0
0x24 - PWM timer2 period and update method configuration register.
sourcepub fn timer2_cfg1(&self) -> &TIMER2_CFG1
pub fn timer2_cfg1(&self) -> &TIMER2_CFG1
0x28 - PWM timer2 working mode and start/stop control configuration register.
sourcepub fn timer2_sync(&self) -> &TIMER2_SYNC
pub fn timer2_sync(&self) -> &TIMER2_SYNC
0x2c - PWM timer2 sync function configuration register.
sourcepub fn timer2_status(&self) -> &TIMER2_STATUS
pub fn timer2_status(&self) -> &TIMER2_STATUS
0x30 - PWM timer2 status register.
sourcepub fn timer_synci_cfg(&self) -> &TIMER_SYNCI_CFG
pub fn timer_synci_cfg(&self) -> &TIMER_SYNCI_CFG
0x34 - Synchronization input selection for three PWM timers.
sourcepub fn operator_timersel(&self) -> &OPERATOR_TIMERSEL
pub fn operator_timersel(&self) -> &OPERATOR_TIMERSEL
0x38 - Select specific timer for PWM operators.
sourcepub fn gen0_stmp_cfg(&self) -> &GEN0_STMP_CFG
pub fn gen0_stmp_cfg(&self) -> &GEN0_STMP_CFG
0x3c - Transfer status and update method for time stamp registers A and B
sourcepub fn gen0_tstmp_a(&self) -> &GEN0_TSTMP_A
pub fn gen0_tstmp_a(&self) -> &GEN0_TSTMP_A
0x40 - Shadow register for register A.
sourcepub fn gen0_tstmp_b(&self) -> &GEN0_TSTMP_B
pub fn gen0_tstmp_b(&self) -> &GEN0_TSTMP_B
0x44 - Shadow register for register B.
sourcepub fn gen0_force(&self) -> &GEN0_FORCE
pub fn gen0_force(&self) -> &GEN0_FORCE
0x4c - Permissives to force PWM0A and PWM0B outputs by software
sourcepub fn dt0_fed_cfg(&self) -> &DT0_FED_CFG
pub fn dt0_fed_cfg(&self) -> &DT0_FED_CFG
0x5c - Shadow register for falling edge delay (FED).
sourcepub fn dt0_red_cfg(&self) -> &DT0_RED_CFG
pub fn dt0_red_cfg(&self) -> &DT0_RED_CFG
0x60 - Shadow register for rising edge delay (RED).
sourcepub fn carrier0_cfg(&self) -> &CARRIER0_CFG
pub fn carrier0_cfg(&self) -> &CARRIER0_CFG
0x64 - Carrier enable and configuratoin
sourcepub fn fh0_status(&self) -> &FH0_STATUS
pub fn fh0_status(&self) -> &FH0_STATUS
0x70 - Status of fault events.
sourcepub fn gen1_stmp_cfg(&self) -> &GEN1_STMP_CFG
pub fn gen1_stmp_cfg(&self) -> &GEN1_STMP_CFG
0x74 - Transfer status and update method for time stamp registers A and B
sourcepub fn gen1_tstmp_a(&self) -> &GEN1_TSTMP_A
pub fn gen1_tstmp_a(&self) -> &GEN1_TSTMP_A
0x78 - Shadow register for register A.
sourcepub fn gen1_tstmp_b(&self) -> &GEN1_TSTMP_B
pub fn gen1_tstmp_b(&self) -> &GEN1_TSTMP_B
0x7c - Shadow register for register B.
sourcepub fn gen1_force(&self) -> &GEN1_FORCE
pub fn gen1_force(&self) -> &GEN1_FORCE
0x84 - Permissives to force PWM1A and PWM1B outputs by software
sourcepub fn dt1_fed_cfg(&self) -> &DT1_FED_CFG
pub fn dt1_fed_cfg(&self) -> &DT1_FED_CFG
0x94 - Shadow register for falling edge delay (FED).
sourcepub fn dt1_red_cfg(&self) -> &DT1_RED_CFG
pub fn dt1_red_cfg(&self) -> &DT1_RED_CFG
0x98 - Shadow register for rising edge delay (RED).
sourcepub fn carrier1_cfg(&self) -> &CARRIER1_CFG
pub fn carrier1_cfg(&self) -> &CARRIER1_CFG
0x9c - Carrier enable and configuratoin
sourcepub fn fh1_status(&self) -> &FH1_STATUS
pub fn fh1_status(&self) -> &FH1_STATUS
0xa8 - Status of fault events.
sourcepub fn gen2_stmp_cfg(&self) -> &GEN2_STMP_CFG
pub fn gen2_stmp_cfg(&self) -> &GEN2_STMP_CFG
0xac - Transfer status and update method for time stamp registers A and B
sourcepub fn gen2_tstmp_a(&self) -> &GEN2_TSTMP_A
pub fn gen2_tstmp_a(&self) -> &GEN2_TSTMP_A
0xb0 - Shadow register for register A.
sourcepub fn gen2_tstmp_b(&self) -> &GEN2_TSTMP_B
pub fn gen2_tstmp_b(&self) -> &GEN2_TSTMP_B
0xb4 - Shadow register for register B.
sourcepub fn gen2_force(&self) -> &GEN2_FORCE
pub fn gen2_force(&self) -> &GEN2_FORCE
0xbc - Permissives to force PWM2A and PWM2B outputs by software
sourcepub fn dt2_fed_cfg(&self) -> &DT2_FED_CFG
pub fn dt2_fed_cfg(&self) -> &DT2_FED_CFG
0xcc - Shadow register for falling edge delay (FED).
sourcepub fn dt2_red_cfg(&self) -> &DT2_RED_CFG
pub fn dt2_red_cfg(&self) -> &DT2_RED_CFG
0xd0 - Shadow register for rising edge delay (RED).
sourcepub fn carrier2_cfg(&self) -> &CARRIER2_CFG
pub fn carrier2_cfg(&self) -> &CARRIER2_CFG
0xd4 - Carrier enable and configuratoin
sourcepub fn fh2_status(&self) -> &FH2_STATUS
pub fn fh2_status(&self) -> &FH2_STATUS
0xe0 - Status of fault events.
sourcepub fn fault_detect(&self) -> &FAULT_DETECT
pub fn fault_detect(&self) -> &FAULT_DETECT
0xe4 - Fault detection configuration and status
sourcepub fn cap_timer_cfg(&self) -> &CAP_TIMER_CFG
pub fn cap_timer_cfg(&self) -> &CAP_TIMER_CFG
0xe8 - Configure capture timer
sourcepub fn cap_timer_phase(&self) -> &CAP_TIMER_PHASE
pub fn cap_timer_phase(&self) -> &CAP_TIMER_PHASE
0xec - Phase for capture timer sync
sourcepub fn cap_ch0_cfg(&self) -> &CAP_CH0_CFG
pub fn cap_ch0_cfg(&self) -> &CAP_CH0_CFG
0xf0 - Capture channel 0 configuration and enable
sourcepub fn cap_ch1_cfg(&self) -> &CAP_CH1_CFG
pub fn cap_ch1_cfg(&self) -> &CAP_CH1_CFG
0xf4 - Capture channel 1 configuration and enable
sourcepub fn cap_ch2_cfg(&self) -> &CAP_CH2_CFG
pub fn cap_ch2_cfg(&self) -> &CAP_CH2_CFG
0xf8 - Capture channel 2 configuration and enable
sourcepub fn cap_status(&self) -> &CAP_STATUS
pub fn cap_status(&self) -> &CAP_STATUS
0x108 - Edge of last capture trigger
sourcepub fn update_cfg(&self) -> &UPDATE_CFG
pub fn update_cfg(&self) -> &UPDATE_CFG
0x10c - Enable update.