Function esp_idf_sys::pcnt_del_unit

source ·
pub unsafe extern "C" fn pcnt_del_unit(
    unit: pcnt_unit_handle_t,
) -> esp_err_t
Expand description

@brief Delete the PCNT unit handle

@note A PCNT unit can’t be in the enable state when this function is invoked. See also pcnt_unit_disable() for how to disable a unit.

@param[in] unit PCNT unit handle created by pcnt_new_unit() @return - ESP_OK: Delete the PCNT unit successfully - ESP_ERR_INVALID_ARG: Delete the PCNT unit failed because of invalid argument - ESP_ERR_INVALID_STATE: Delete the PCNT unit failed because the unit is not in init state or some PCNT channel is still in working - ESP_FAIL: Delete the PCNT unit failed because of other error