small changes and many new sensors
This commit is contained in:
@@ -100,6 +100,7 @@
|
||||
#include "driver/gpio.h"
|
||||
#include "esp8266/gpio_struct.h"
|
||||
|
||||
|
||||
struct MyGPIO {
|
||||
|
||||
static inline bool get(const uint8_t num) {
|
||||
@@ -166,6 +167,11 @@
|
||||
ESP_ERROR_CHECK(gpio_config(&io_conf));
|
||||
}
|
||||
|
||||
static void setBuiltInLED(bool on) {
|
||||
setOutput(GPIO_NUM_2);
|
||||
if (on) {clear(GPIO_NUM_2);} else {set(GPIO_NUM_2);}
|
||||
}
|
||||
|
||||
static void toggleBuiltInLED() {
|
||||
static bool level = false;
|
||||
setOutput(GPIO_NUM_2);
|
||||
@@ -179,6 +185,7 @@
|
||||
#elif IS_ESP32
|
||||
|
||||
#include "driver/gpio.h"
|
||||
#include "soc/gpio_reg.h"
|
||||
|
||||
// NOTE from the manual
|
||||
// GPIO 6-11 are usually used for SPI flash.
|
||||
|
||||
Reference in New Issue
Block a user