pub unsafe extern "C" fn mcpwm_new_capture_channel(
    cap_timer: *mut mcpwm_cap_timer_t,
    config: *const mcpwm_capture_channel_config_t,
    ret_cap_channel: *mut *mut mcpwm_cap_channel_t
) -> i32
Expand description

@brief Create MCPWM capture channel

@note The created capture channel won’t be enabled until calling mcpwm_capture_channel_enable

@param[in] cap_timer MCPWM capture timer, allocated by mcpwm_new_capture_timer(), will be connected to the new capture channel @param[in] config MCPWM capture channel configuration @param[out] ret_cap_channel Returned MCPWM capture channel @return - ESP_OK: Create MCPWM capture channel successfully - ESP_ERR_INVALID_ARG: Create MCPWM capture channel failed because of invalid argument - ESP_ERR_NO_MEM: Create MCPWM capture channel failed because out of memory - ESP_ERR_NOT_FOUND: Create MCPWM capture channel failed because can’t find free resource - ESP_FAIL: Create MCPWM capture channel failed because of other error