force prov

This commit is contained in:
2021-03-09 17:39:04 +01:00
parent 9380be167e
commit 4431d7b951
4 changed files with 39 additions and 2 deletions

20
src/main/gpio.c Normal file
View File

@ -0,0 +1,20 @@
#include <stdbool.h>
#include "gpio.h"
#include <driver/gpio.h>
void gpioInit() {
gpio_config_t io_conf;
io_conf.intr_type = GPIO_INTR_DISABLE;
io_conf.pin_bit_mask = (1ULL << GPIO_FORCE_PROV);
io_conf.mode = GPIO_MODE_INPUT;
io_conf.pull_up_en = 1;
gpio_config(&io_conf);
}
bool isGpioForceProv() {
return 0 == gpio_get_level(GPIO_FORCE_PROV);
}