mcpwm_fault_register_event_callbacks() function
Set event callbacks for MCPWM fault
Arguments
fault
MCPWM GPIO fault handle, allocated by `mcpwm_new_gpio_fault()`
cbs
Group of callback functions
user_data
User data, which will be passed to callback functions directly
Return value
- ESP_OK: Set event callbacks successfully - ESP_ERR_INVALID_ARG: Set event callbacks failed because of invalid argument - ESP_FAIL: Set event callbacks failed because of other error
Notes
User can deregister a previously registered callback by calling this function and setting the callback member in the `cbs` structure to NULL.
mcpwm_fault_register_event_callbacks() calls 8 functions:
![]()
mcpwm_fault_register_event_callbacks()
mcpwm_fault_register_event_callbacks() reads 20 variables and writes 3 variables:
![]()
mcpwm_fault_register_event_callbacks()