pcnt_unit_disable() function
Disable the PCNT unit
Arguments
unit
PCNT unit handle created by `pcnt_new_unit()`
Return value
- 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
Notes
This function will do the opposite work to the `pcnt_unit_enable()` Disable a PCNT unit doesn't mean to stop it. See also `pcnt_unit_stop()` for how to stop the PCNT counter.
pcnt_unit_disable() calls 4 functions:
![]()
pcnt_unit_disable()
pcnt_unit_disable() reads 11 variables and writes 1 variable:
![]()
pcnt_unit_disable()