Code: Select all
gpio_config_t io_conf;
// configure interrupt pins
// set as input mode
io_conf.mode = GPIO_MODE_INPUT;
// interrupt
io_conf.intr_type = GPIO_INTR_DISABLE;
// bit mask of the pins
io_conf.pin_bit_mask = (BIT(39) | BIT(36) | BIT(34));
// dis pull-down mode
io_conf.pull_down_en = GPIO_PULLDOWN_DISABLE;
// disable pull-up mode
io_conf.pull_up_en = GPIO_PULLUP_DISABLE;
esp_err_t ret_gpio = gpio_config(&io_conf);
Code: Select all
gpio_get_level(36);
//...