Function esp_idf_sys::pcnt_channel_set_level_action

source ยท
pub unsafe extern "C" fn pcnt_channel_set_level_action(
    chan: pcnt_channel_handle_t,
    high_act: pcnt_channel_level_action_t,
    low_act: pcnt_channel_level_action_t,
) -> esp_err_t
Expand description

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

@param[in] chan PCNT channel handle created by pcnt_new_channel() @param[in] high_act Action on high level signal @param[in] low_act Action on low level signal @return - ESP_OK: Set level action for PCNT channel successfully - ESP_ERR_INVALID_ARG: Set level action for PCNT channel failed because of invalid argument - ESP_FAIL: Set level action for PCNT channel failed because of other error