mcpwm_generator_set_action_on_sync_event() function
Set generator action on MCPWM Sync event
Arguments
generator
MCPWM generator handle, allocated by `mcpwm_new_generator()`
ev_act
MCPWM trigger event action, can be constructed by `MCPWM_GEN_SYNC_EVENT_ACTION` helper macro
Return value
- ESP_OK: Set generator action successfully - ESP_ERR_INVALID_ARG: Set generator action failed because of invalid argument - ESP_FAIL: Set generator action failed because of other error
Notes
The trigger only support one sync action, regardless of the kinds. Should not call this function more than once.
mcpwm_generator_set_action_on_sync_event() calls 6 functions:
![]()
mcpwm_generator_set_action_on_sync_event()
mcpwm_generator_set_action_on_sync_event() reads 18 variables:
![]()
mcpwm_generator_set_action_on_sync_event()