Struct esp32s3_hal::mcpwm::operator::Operator
source · pub struct Operator<const OP: u8, PWM> { /* private fields */ }
Expand description
A MCPWM operator
The PWM Operator submodule has the following functions:
- Generates a PWM signal pair, based on timing references obtained from the corresponding PWM timer.
- Each signal out of the PWM signal pair includes a specific pattern of dead time. (Not yet implemented)
- Superimposes a carrier on the PWM signal, if configured to do so. (Not yet implemented)
- Handles response under fault conditions. (Not yet implemented)
Implementations§
source§impl<const OP: u8, PWM> Operator<OP, PWM>where
PWM: PwmPeripheral,
impl<const OP: u8, PWM> Operator<OP, PWM>where
PWM: PwmPeripheral,
sourcepub fn with_pin_a<Pin>(
self,
pin: Pin,
config: PwmPinConfig<true>
) -> PwmPin<Pin, PWM, OP, true>where
Pin: OutputPin,
pub fn with_pin_a<Pin>(
self,
pin: Pin,
config: PwmPinConfig<true>
) -> PwmPin<Pin, PWM, OP, true>where
Pin: OutputPin,
Use the A output with the given pin and configuration
sourcepub fn with_pin_b<Pin>(
self,
pin: Pin,
config: PwmPinConfig<false>
) -> PwmPin<Pin, PWM, OP, false>where
Pin: OutputPin,
pub fn with_pin_b<Pin>(
self,
pin: Pin,
config: PwmPinConfig<false>
) -> PwmPin<Pin, PWM, OP, false>where
Pin: OutputPin,
Use the B output with the given pin and configuration
sourcepub fn with_pins<PinA, PinB>(
self,
pin_a: PinA,
config_a: PwmPinConfig<true>,
pin_b: PinB,
config_b: PwmPinConfig<false>
) -> (PwmPin<PinA, PWM, OP, true>, PwmPin<PinB, PWM, OP, false>)where
PinA: OutputPin,
PinB: OutputPin,
pub fn with_pins<PinA, PinB>(
self,
pin_a: PinA,
config_a: PwmPinConfig<true>,
pin_b: PinB,
config_b: PwmPinConfig<false>
) -> (PwmPin<PinA, PWM, OP, true>, PwmPin<PinB, PWM, OP, false>)where
PinA: OutputPin,
PinB: OutputPin,
Use both the A and the B output with the given pins and configurations