Function esp_idf_sys::pcnt_new_unit

source ยท
pub unsafe extern "C" fn pcnt_new_unit(
    config: *const pcnt_unit_config_t,
    ret_unit: *mut pcnt_unit_handle_t,
) -> esp_err_t
Expand description

@brief Create a new PCNT unit, and return the handle

@note The newly created PCNT unit is put in the init state.

@param[in] config PCNT unit configuration @param[out] ret_unit Returned PCNT unit handle @return - ESP_OK: Create PCNT unit successfully - ESP_ERR_INVALID_ARG: Create PCNT unit failed because of invalid argument (e.g. high/low limit value out of the range) - ESP_ERR_NO_MEM: Create PCNT unit failed because out of memory - ESP_ERR_NOT_FOUND: Create PCNT unit failed because all PCNT units are used up and no more free one - ESP_FAIL: Create PCNT unit failed because of other error