pub struct DeadTimeCfg { /* private fields */ }
unstable
only.Expand description
Configuration for MCPWM Operator DeadTime It’s recommended to reference the technical manual for configuration
Implementations§
Source§impl DeadTimeCfg
impl DeadTimeCfg
Sourcepub const fn new_bypass() -> DeadTimeCfg
pub const fn new_bypass() -> DeadTimeCfg
Uses the following configuration:
- Clock: PWM_clk
- Bypass: A & B
- Inputs: A->A, B->B (InSel)
- Outputs: A->A, B->B (OutSwap)
- No Dual-edge B
- No Invert
- FED/RED update mode = immediate
Sourcepub const fn new_ahc() -> DeadTimeCfg
pub const fn new_ahc() -> DeadTimeCfg
Active High Complementary (AHC) from Technical Reference manual
Will generate a PWM from input PWMA, such that output PWMA & PWMB are each others complement except during a transition in which they will be both off (as deadtime) such that they should never overlap, useful for H-Bridge type scenarios
Sourcepub const fn invert_output(self, fed: bool, red: bool) -> Self
pub const fn invert_output(self, fed: bool, red: bool) -> Self
Sets FED/RED output inverter Inverts the output of the FED/RED module (excl DEB mode feedback)
Sourcepub const fn set_output_swap(self, stream: PWMStream, swap: bool) -> Self
pub const fn set_output_swap(self, stream: PWMStream, swap: bool) -> Self
Swaps the output of a PWM Stream i.e. If both streams have output_swap enabled, the output of the module is swapped, while if only one is enabled that one ‘copies’ from the other stream
Sourcepub const fn set_bypass(self, stream: PWMStream, enable: bool) -> Self
pub const fn set_bypass(self, stream: PWMStream, enable: bool) -> Self
Set PWMA/PWMB stream to bypass everything except output_swap This means no deadtime is applied when enabled
Sourcepub const fn select_clock(self, pwm_clock: bool) -> Self
pub const fn select_clock(self, pwm_clock: bool) -> Self
Select Between PWMClk & PT_Clk
Sourcepub const fn select_input(self, fed: PWMStream, red: PWMStream) -> Self
pub const fn select_input(self, fed: PWMStream, red: PWMStream) -> Self
Select which stream is used for the input of FED/RED
Trait Implementations§
Source§impl Clone for DeadTimeCfg
impl Clone for DeadTimeCfg
Source§fn clone(&self) -> DeadTimeCfg
fn clone(&self) -> DeadTimeCfg
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreimpl Copy for DeadTimeCfg
Auto Trait Implementations§
impl Freeze for DeadTimeCfg
impl RefUnwindSafe for DeadTimeCfg
impl Send for DeadTimeCfg
impl Sync for DeadTimeCfg
impl Unpin for DeadTimeCfg
impl UnwindSafe for DeadTimeCfg
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut u8)
unsafe fn clone_to_uninit(&self, dst: *mut u8)
clone_to_uninit
)