Function esp_idf_sys::pcnt_set_mode

source ยท
pub unsafe extern "C" fn pcnt_set_mode(
    unit: pcnt_unit_t,
    channel: pcnt_channel_t,
    pos_mode: pcnt_count_mode_t,
    neg_mode: pcnt_count_mode_t,
    hctrl_mode: pcnt_ctrl_mode_t,
    lctrl_mode: pcnt_ctrl_mode_t,
) -> esp_err_t
Expand description

@brief Set PCNT counter mode

@param unit PCNT unit number @param channel PCNT channel number @param pos_mode Counter mode when detecting positive edge @param neg_mode Counter mode when detecting negative edge @param hctrl_mode Counter mode when control signal is high level @param lctrl_mode Counter mode when control signal is low level

@return - ESP_OK Success - ESP_ERR_INVALID_STATE pcnt driver has not been initialized - ESP_ERR_INVALID_ARG Parameter error