8 #ifndef COMPONENTS_CPP_UTILS_GPIO_H_
9 #define COMPONENTS_CPP_UTILS_GPIO_H_
10 #include <driver/gpio.h>
34 static void addISRHandler(gpio_num_t pin, gpio_isr_t handler,
void* pArgs);
35 static void high(gpio_num_t pin);
38 static bool inRange(gpio_num_t pin);
39 static void low(gpio_num_t pin);
40 static bool read(gpio_num_t pin);
41 static void setInput(gpio_num_t pin);
44 static void write(gpio_num_t pin,
bool value);
45 static void writeByte(gpio_num_t pins[], uint8_t value,
int bits);
static void setOutput(gpio_num_t pin)
Set the pin as output.
Definition: GPIO.cpp:176
static void interruptEnable(gpio_num_t pin)
Enable interrupts on the named pin.
Definition: GPIO.cpp:97
static void write(gpio_num_t pin, bool value)
Write a value to the given pin.
Definition: GPIO.cpp:189
static void setInterruptType(gpio_num_t pin, gpio_int_type_t intrType)
Set the interrupt type. The type of interrupt can be one of:
Definition: GPIO.cpp:157
static void low(gpio_num_t pin)
Set the pin low.
Definition: GPIO.cpp:113
static void writeByte(gpio_num_t pins[], uint8_t value, int bits)
Write up to 8 bits of data to a set of pins.
Definition: GPIO.cpp:204
static void addISRHandler(gpio_num_t pin, gpio_isr_t handler, void *pArgs)
Add an ISR handler to the pin.
Definition: GPIO.cpp:24
static void high(gpio_num_t pin)
Set the pin high.
Definition: GPIO.cpp:60
static void interruptDisable(gpio_num_t pin)
Disable interrupts on the named pin.
Definition: GPIO.cpp:84
static void setInput(gpio_num_t pin)
Set the pin as input.
Definition: GPIO.cpp:137
static bool read(gpio_num_t pin)
Read a value from the given pin.
Definition: GPIO.cpp:125
Interface to GPIO functions.
Definition: GPIO.h:32
static bool inRange(gpio_num_t pin)
Determine if the pin is a valid pin for an ESP32 (i.e. is it in range).
Definition: GPIO.cpp:71