Struct esp_idf_sys::pcnt_config_t
source · #[repr(C)]pub struct pcnt_config_t {
pub pulse_gpio_num: c_int,
pub ctrl_gpio_num: c_int,
pub lctrl_mode: pcnt_ctrl_mode_t,
pub hctrl_mode: pcnt_ctrl_mode_t,
pub pos_mode: pcnt_count_mode_t,
pub neg_mode: pcnt_count_mode_t,
pub counter_h_lim: i16,
pub counter_l_lim: i16,
pub unit: pcnt_unit_t,
pub channel: pcnt_channel_t,
}
Expand description
@brief Pulse Counter configuration for a single channel
Fields§
§pulse_gpio_num: c_int
< Pulse input GPIO number, if you want to use GPIO16, enter pulse_gpio_num = 16, a negative value will be ignored
ctrl_gpio_num: c_int
< Control signal input GPIO number, a negative value will be ignored
lctrl_mode: pcnt_ctrl_mode_t
< PCNT low control mode
hctrl_mode: pcnt_ctrl_mode_t
< PCNT high control mode
pos_mode: pcnt_count_mode_t
< PCNT positive edge count mode
neg_mode: pcnt_count_mode_t
< PCNT negative edge count mode
counter_h_lim: i16
< Maximum counter value
counter_l_lim: i16
< Minimum counter value
unit: pcnt_unit_t
< PCNT unit number
channel: pcnt_channel_t
< the PCNT channel