Function esp_idf_hal::sys::mcpwm_capture_channel_enable
source · pub unsafe extern "C" fn mcpwm_capture_channel_enable(
cap_channel: *mut mcpwm_cap_channel_t,
) -> i32
Expand description
@brief Enable MCPWM capture channel
@note This function will transit the channel state from init to enable.
@note This function will enable the interrupt service, if it’s lazy installed in mcpwm_capture_channel_register_event_callbacks()
.
@param[in] cap_channel MCPWM capture channel handle, allocated by mcpwm_new_capture_channel()
@return
- ESP_OK: Enable MCPWM capture channel successfully
- ESP_ERR_INVALID_ARG: Enable MCPWM capture channel failed because of invalid argument
- ESP_ERR_INVALID_STATE: Enable MCPWM capture channel failed because the channel is already enabled
- ESP_FAIL: Enable MCPWM capture channel failed because of other error