pub struct MCPWM0 { /* private fields */ }
Expand description
Motor Control Pulse-Width Modulation 0
Implementations§
Source§impl MCPWM0
impl MCPWM0
Sourcepub const PTR: *const RegisterBlock = {0x500c0000 as *const mcpwm0::RegisterBlock}
pub const PTR: *const RegisterBlock = {0x500c0000 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 timer(&self, n: usize) -> &TIMER
pub fn timer(&self, n: usize) -> &TIMER
0x04..0x34 - Cluster TIMER%s, containing TIMER?_CFG0, TIMER?_CFG1, TIMER?_SYNC, TIMER?_STATUS
Sourcepub fn timer_iter(&self) -> impl Iterator<Item = &TIMER>
pub fn timer_iter(&self) -> impl Iterator<Item = &TIMER>
Iterator for array of: 0x04..0x34 - Cluster TIMER%s, containing TIMER?_CFG0, TIMER?_CFG1, TIMER?_SYNC, TIMER?_STATUS
Sourcepub fn timer_synci_cfg(&self) -> &TIMER_SYNCI_CFG
pub fn timer_synci_cfg(&self) -> &TIMER_SYNCI_CFG
0x34 - Synchronization input selection register for PWM timers.
Sourcepub fn operator_timersel(&self) -> &OPERATOR_TIMERSEL
pub fn operator_timersel(&self) -> &OPERATOR_TIMERSEL
0x38 - PWM operator’s timer select register
Sourcepub fn ch(&self, n: usize) -> &CH
pub fn ch(&self, n: usize) -> &CH
0x3c..0xe4 - Cluster CH%s, containing GEN?_STMP_CFG, GEN?_TSTMP_A, GEN?_TSTMP_B, GEN?_CFG0, GEN?_FORCE, GEN?_A, GEN?_B, DT?_CFG, DT?_FED_CFG, DT?_RED_CFG, CARRIER?_CFG, FH?_CFG0, FH?_CFG1, FH?_STATUS
Sourcepub fn ch_iter(&self) -> impl Iterator<Item = &CH>
pub fn ch_iter(&self) -> impl Iterator<Item = &CH>
Iterator for array of: 0x3c..0xe4 - Cluster CH%s, containing GEN?_STMP_CFG, GEN?_TSTMP_A, GEN?_TSTMP_B, GEN?_CFG0, GEN?_FORCE, GEN?_A, GEN?_B, DT?_CFG, DT?_FED_CFG, DT?_RED_CFG, CARRIER?_CFG, FH?_CFG0, FH?_CFG1, FH?_STATUS
Sourcepub fn fault_detect(&self) -> &FAULT_DETECT
pub fn fault_detect(&self) -> &FAULT_DETECT
0xe4 - Fault detection configuration and status register
Sourcepub fn cap_timer_cfg(&self) -> &CAP_TIMER_CFG
pub fn cap_timer_cfg(&self) -> &CAP_TIMER_CFG
0xe8 - Capture timer configuration register
Sourcepub fn cap_timer_phase(&self) -> &CAP_TIMER_PHASE
pub fn cap_timer_phase(&self) -> &CAP_TIMER_PHASE
0xec - Capture timer sync phase register
Sourcepub fn cap_ch_cfg(&self, n: usize) -> &CAP_CH_CFG
pub fn cap_ch_cfg(&self, n: usize) -> &CAP_CH_CFG
0xf0..0xfc - Capture channel %s configuration register
Sourcepub fn cap_ch_cfg_iter(&self) -> impl Iterator<Item = &CAP_CH_CFG>
pub fn cap_ch_cfg_iter(&self) -> impl Iterator<Item = &CAP_CH_CFG>
Iterator for array of: 0xf0..0xfc - Capture channel %s configuration register
Sourcepub fn cap_ch0_cfg(&self) -> &CAP_CH_CFG
pub fn cap_ch0_cfg(&self) -> &CAP_CH_CFG
0xf0 - Capture channel 0 configuration register
Sourcepub fn cap_ch1_cfg(&self) -> &CAP_CH_CFG
pub fn cap_ch1_cfg(&self) -> &CAP_CH_CFG
0xf4 - Capture channel 1 configuration register
Sourcepub fn cap_ch2_cfg(&self) -> &CAP_CH_CFG
pub fn cap_ch2_cfg(&self) -> &CAP_CH_CFG
0xf8 - Capture channel 2 configuration register
Sourcepub fn cap_ch_iter(&self) -> impl Iterator<Item = &CAP_CH>
pub fn cap_ch_iter(&self) -> impl Iterator<Item = &CAP_CH>
Iterator for array of: 0xfc..0x108 - CAP%s capture value register
Sourcepub fn cap_status(&self) -> &CAP_STATUS
pub fn cap_status(&self) -> &CAP_STATUS
0x108 - Last capture trigger edge information register
Sourcepub fn update_cfg(&self) -> &UPDATE_CFG
pub fn update_cfg(&self) -> &UPDATE_CFG
0x10c - Generator Update configuration register
Sourcepub fn op_tstmp_e1(&self, n: usize) -> &OP_TSTMP_E1
pub fn op_tstmp_e1(&self, n: usize) -> &OP_TSTMP_E1
0x12c..0x138 - Generator%s timer stamp E1 value register
Sourcepub fn op_tstmp_e1_iter(&self) -> impl Iterator<Item = &OP_TSTMP_E1>
pub fn op_tstmp_e1_iter(&self) -> impl Iterator<Item = &OP_TSTMP_E1>
Iterator for array of: 0x12c..0x138 - Generator%s timer stamp E1 value register
Sourcepub fn op0_tstmp_e1(&self) -> &OP_TSTMP_E1
pub fn op0_tstmp_e1(&self) -> &OP_TSTMP_E1
0x12c - Generator0 timer stamp E1 value register
Sourcepub fn op1_tstmp_e1(&self) -> &OP_TSTMP_E1
pub fn op1_tstmp_e1(&self) -> &OP_TSTMP_E1
0x134 - Generator1 timer stamp E1 value register
Sourcepub fn op2_tstmp_e1(&self) -> &OP_TSTMP_E1
pub fn op2_tstmp_e1(&self) -> &OP_TSTMP_E1
0x13c - Generator2 timer stamp E1 value register
Sourcepub fn op_tstmp_e2(&self, n: usize) -> &OP_TSTMP_E2
pub fn op_tstmp_e2(&self, n: usize) -> &OP_TSTMP_E2
0x130..0x13c - Generator%s timer stamp E2 value register
Sourcepub fn op_tstmp_e2_iter(&self) -> impl Iterator<Item = &OP_TSTMP_E2>
pub fn op_tstmp_e2_iter(&self) -> impl Iterator<Item = &OP_TSTMP_E2>
Iterator for array of: 0x130..0x13c - Generator%s timer stamp E2 value register
Sourcepub fn op0_tstmp_e2(&self) -> &OP_TSTMP_E2
pub fn op0_tstmp_e2(&self) -> &OP_TSTMP_E2
0x130 - Generator0 timer stamp E2 value register
Sourcepub fn op1_tstmp_e2(&self) -> &OP_TSTMP_E2
pub fn op1_tstmp_e2(&self) -> &OP_TSTMP_E2
0x138 - Generator1 timer stamp E2 value register
Sourcepub fn op2_tstmp_e2(&self) -> &OP_TSTMP_E2
pub fn op2_tstmp_e2(&self) -> &OP_TSTMP_E2
0x140 - Generator2 timer stamp E2 value register