Function esp_idf_sys::pcnt_unit_add_watch_point

source ยท
pub unsafe extern "C" fn pcnt_unit_add_watch_point(
    unit: pcnt_unit_handle_t,
    watch_point: c_int,
) -> esp_err_t
Expand description

@brief Add a watch point for PCNT unit, PCNT will generate an event when the counter value reaches the watch point value

@param[in] unit PCNT unit handle created by pcnt_new_unit() @param[in] watch_point Value to be watched @return - ESP_OK: Add watch point successfully - ESP_ERR_INVALID_ARG: Add watch point failed because of invalid argument (e.g. the value to be watched is out of the limitation set in pcnt_unit_config_t) - ESP_ERR_INVALID_STATE: Add watch point failed because the same watch point has already been added - ESP_ERR_NOT_FOUND: Add watch point failed because no more hardware watch point can be configured - ESP_FAIL: Add watch point failed because of other error