Function esp_idf_svc::sys::mcpwm_fault_register_event_callbacks
source ยท pub unsafe extern "C" fn mcpwm_fault_register_event_callbacks(
fault: *mut mcpwm_fault_t,
cbs: *const mcpwm_fault_event_callbacks_t,
user_data: *mut c_void,
) -> i32
Expand description
@brief Set event callbacks for MCPWM fault
@note User can deregister a previously registered callback by calling this function and setting the callback member in the cbs
structure to NULL.
@param[in] fault MCPWM GPIO fault handle, allocated by mcpwm_new_gpio_fault()
@param[in] cbs Group of callback functions
@param[in] user_data User data, which will be passed to callback functions directly
@return
- 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