Set channel actions when edge signal changes (e.g. falling or rising edge occurred). The edge signal is input from the `edge_gpio_num` configured in `pcnt_chan_config_t`. We use these actions to control when and how to change the counter value.
PCNT channel handle created by `pcnt_new_channel()`
pos_act
Action on posedge signal
neg_act
Action on negedge signal
Return value
- ESP_OK: Set edge action for PCNT channel successfully - ESP_ERR_INVALID_ARG: Set edge action for PCNT channel failed because of invalid argument - ESP_FAIL: Set edge action for PCNT channel failed because of other error
Related Functions
Found 3 other functions taking a pcnt_chan_t
argument:
Set channel actions when level signal changes (e.g. signal level goes from high to low). The level signal is input from the `level_gpio_num` configured in `pcnt_chan_config_t`. We use these actions to control when and how to change the counting mode.