pub unsafe extern "C" fn mcpwm_capture_channel_register_event_callbacks(
    cap_channel: mcpwm_cap_channel_handle_t,
    cbs: *const mcpwm_capture_event_callbacks_t,
    user_data: *mut c_void
) -> esp_err_t
Expand description

@brief Set event callbacks for MCPWM capture channel

@note The first call to this function needs to be before the call to mcpwm_capture_channel_enable @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] cap_channel MCPWM capture channel handle, allocated by mcpwm_new_capture_channel() @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_ERR_INVALID_STATE: Set event callbacks failed because the channel is not in init state - ESP_FAIL: Set event callbacks failed because of other error