View difference between Paste ID: Ln97kK7F and dYXYUeRG
SHOW: | | - or go back to the newest paste.
1
#include "driver/gpio.h"
2
#include "button.h"
3
4
#define GPIO_BUTTON GPIO_NUM_1
5-
    {
5+
6
void button_init(void)
7
{
8
        gpio_config_t io_conf = {};
9
        io_conf.pin_bit_mask = 1ULL << GPIO_BUTTON;
10
        io_conf.mode = GPIO_MODE_INPUT;
11
        io_conf.pull_up_en = GPIO_PULLUP_ENABLE;
12
        io_conf.pull_down_en = GPIO_PULLDOWN_DISABLE;
13
        io_conf.intr_type = GPIO_INTR_DISABLE;
14-
    }
14+
15
        gpio_config(&io_conf);
16
}