8 #ifndef COMPONENTS_CPP_UTILS_GPIO_H_
9 #define COMPONENTS_CPP_UTILS_GPIO_H_
10 #include <driver/gpio.h>
33 static void addISRHandler(gpio_num_t pin, gpio_isr_t handler,
void* pArgs);
34 static void high(gpio_num_t pin);
37 static bool inRange(gpio_num_t pin);
38 static void low(gpio_num_t pin);
39 static bool read(gpio_num_t pin);
40 static void setInput(gpio_num_t pin);
43 static void write(gpio_num_t pin,
bool value);
44 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:167
static void interruptEnable(gpio_num_t pin)
Enable interrupts on the named pin.
Definition: GPIO.cpp:91
static void write(gpio_num_t pin, bool value)
Write a value to the given pin.
Definition: GPIO.cpp:180
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:151
static void low(gpio_num_t pin)
Set the pin low.
Definition: GPIO.cpp:107
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:195
static void addISRHandler(gpio_num_t pin, gpio_isr_t handler, void *pArgs)
Add an ISR handler to the pin.
Definition: GPIO.cpp:25
static void high(gpio_num_t pin)
Set the pin high.
Definition: GPIO.cpp:57
static void interruptDisable(gpio_num_t pin)
Disable interrupts on the named pin.
Definition: GPIO.cpp:78
static void setInput(gpio_num_t pin)
Set the pin as input.
Definition: GPIO.cpp:131
static bool read(gpio_num_t pin)
Read a value from the given pin.
Definition: GPIO.cpp:119
Interface to GPIO functions.
Definition: GPIO.h:31
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:68