pcnt_unit_add_watch_point() function
Add a watch point for PCNT unit, PCNT will generate an event when the counter value reaches the watch point value
Arguments
unit
PCNT unit handle created by `pcnt_new_unit()`
watch_point
Value to be watched
Return value
- 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
pcnt_unit_add_watch_point() calls 9 functions:
![]()
pcnt_unit_add_watch_point()
pcnt_unit_add_watch_point() reads 21 variables and writes 2 variables:
![]()
pcnt_unit_add_watch_point()