Function esp_idf_sys::pcnt_unit_disable

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

@brief Disable the PCNT unit

@note This function will do the opposite work to the pcnt_unit_enable() @note Disable a PCNT unit doesn’t mean to stop it. See also pcnt_unit_stop() for how to stop the PCNT counter.

@param[in] unit PCNT unit handle created by pcnt_new_unit() @return - ESP_OK: Disable PCNT unit successfully - ESP_ERR_INVALID_ARG: Disable PCNT unit failed because of invalid argument - ESP_ERR_INVALID_STATE: Disable PCNT unit failed because the unit is not enabled yet - ESP_FAIL: Disable PCNT unit failed because of other error