Function esp_idf_sys::mcpwm_new_timer_sync_src
source ยท pub unsafe extern "C" fn mcpwm_new_timer_sync_src(
timer: mcpwm_timer_handle_t,
config: *const mcpwm_timer_sync_src_config_t,
ret_sync: *mut mcpwm_sync_handle_t,
) -> esp_err_t
Expand description
@brief Create MCPWM timer sync source
@param[in] timer MCPWM timer handle, allocated by mcpwm_new_timer()
@param[in] config MCPWM timer sync source configuration
@param[out] ret_sync Returned MCPWM sync handle
@return
- ESP_OK: Create MCPWM timer sync source successfully
- ESP_ERR_INVALID_ARG: Create MCPWM timer sync source failed because of invalid argument
- ESP_ERR_NO_MEM: Create MCPWM timer sync source failed because out of memory
- ESP_ERR_INVALID_STATE: Create MCPWM timer sync source failed because the timer has created a sync source before
- ESP_FAIL: Create MCPWM timer sync source failed because of other error