Function esp_idf_svc::sys::mcpwm_operator_recover_from_fault
source · pub unsafe extern "C" fn mcpwm_operator_recover_from_fault(
oper: *mut mcpwm_oper_t,
fault: *mut mcpwm_fault_t,
) -> i32
Expand description
@brief Try to make the operator recover from fault
@note To recover from fault or escape from trip, you make sure the fault signal has dissappeared already. Otherwise the recovery can’t succeed.
@param[in] oper MCPWM operator, allocated by mcpwm_new_operator()
@param[in] fault MCPWM fault handle
@return
- ESP_OK: Recover from fault successfully
- ESP_ERR_INVALID_ARG: Recover from fault failed because of invalid argument
- ESP_ERR_INVALID_STATE: Recover from fault failed because the fault source is still active
- ESP_FAIL: Recover from fault failed because of other error