pcnt_unit_add_watch_step() function
Add a step notify for PCNT unit, PCNT will generate an event when the incremental(can be positive or negative) of counter value reaches the step interval
Arguments
unit
PCNT unit handle created by `pcnt_new_unit()`
step_interval
PCNT step notify interval value
Return value
- ESP_OK: Add step notify successfully - ESP_ERR_INVALID_ARG: Add step notify failed because of invalid argument (e.g. the value incremental to be watched is out of the limitation set in `pcnt_unit_config_t`) - ESP_ERR_INVALID_STATE: Add step notify failed because the step notify has already been added - ESP_FAIL: Add step notify failed because of other error