Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "driver/gpio.h"
- #include "button.h"
- #define GPIO_BUTTON GPIO_NUM_1
- void button_init(void)
- {
- gpio_config_t io_conf = {};
- io_conf.pin_bit_mask = 1ULL << GPIO_BUTTON;
- io_conf.mode = GPIO_MODE_INPUT;
- io_conf.pull_up_en = GPIO_PULLUP_ENABLE;
- io_conf.pull_down_en = GPIO_PULLDOWN_DISABLE;
- io_conf.intr_type = GPIO_INTR_DISABLE;
- gpio_config(&io_conf);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement