Function esp_idf_sys::pcnt_channel_set_edge_action

source ยท
pub unsafe extern "C" fn pcnt_channel_set_edge_action(
    chan: pcnt_channel_handle_t,
    pos_act: pcnt_channel_edge_action_t,
    neg_act: pcnt_channel_edge_action_t,
) -> esp_err_t
Expand description

@brief 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.

@param[in] chan PCNT channel handle created by pcnt_new_channel() @param[in] pos_act Action on posedge signal @param[in] neg_act Action on negedge signal @return - 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