SHOW:
         |
         |
         - or go back to the newest paste.    
    | 1 | - | #include <stdio.h>  | 
| 1 | + | #include "driver/gpio.h"  | 
| 2 | #include "button.h"  | |
| 3 | ||
| 4 | - | static button_state_t button;  | 
| 4 | + | void button_init(void)  | 
| 5 |     {
 | |
| 6 | - | void button_init()  | 
| 6 | + |         gpio_config_t io_conf = {};
 | 
| 7 | - | {
 | 
| 7 | + | io_conf.pin_bit_mask = 1ULL << GPIO_BUTTON;  | 
| 8 | - |     printf("Has llamado a button_init\n");
 | 
| 8 | + | io_conf.mode = GPIO_MODE_INPUT;  | 
| 9 | - | }  | 
| 9 | + | io_conf.pull_up_en = GPIO_PULLUP_ENABLE;  | 
| 10 | io_conf.pull_down_en = GPIO_PULLDOWN_DISABLE;  | |
| 11 | io_conf.intr_type = GPIO_INTR_DISABLE;  | |
| 12 | ||
| 13 | gpio_config(&io_conf);  | |
| 14 | }  |