MCPWM generator handle, allocated by `mcpwm_new_generator()`
level
GPIO level to be applied to MCPWM generator, specially, -1 means to remove the force level
hold_on
Whether the forced PWM level should retain (i.e. will remain unchanged until manually remove the force level)
Return value
- ESP_OK: Set force level for MCPWM generator successfully - ESP_ERR_INVALID_ARG: Set force level for MCPWM generator failed because of invalid argument - ESP_FAIL: Set force level for MCPWM generator failed because of other error
Notes
The force level will be applied to the generator immediately, regardless any other events that would change the generator's behaviour. If the `hold_on` is true, the force level will retain forever, until user removes the force level by setting the force level to `-1`. If the `hold_on` is false, the force level can be overridden by the next event action. The force level set by this function can be inverted by GPIO matrix or dead-time module. So the level set here doesn't equal to the final output level.
Related Functions
Found 14 other functions taking a mcpwm_gen_t
argument: