AWS IoT for ESP32 v1.0.0
An ESP-IDF based solution
lib_gpio.h
Go to the documentation of this file.
1/*******************************************************************************
2* Copyright (c) 2021, Buildstorm Pvt Ltd
3*
4* Filename: module_gpio.h
5*
6* Author: Amruta
7* email: amruta@buildstorm.com
8*
9* Description:
10* Contains wrapper functions to handle GPIO functionalities.
11*******************************************************************************/
12
18#ifndef _LIB_GPIO_H_
19#define _LIB_GPIO_H_
20
21/* Includes ------------------------------------------------------------------*/
22
23#include "driver/gpio.h"
24#include "stdutils.h"
25
26/* Macros -----------------------------------------------------------------*/
27#define GPIO_pinWrite(gpioNum, state) gpio_set_level(gpioNum, state)
28#define GPIO_pinRead(gpioNum) gpio_get_level(gpioNum)
29/* User Defined Data Types ------------------------------------------------*/
30
35typedef void (*gpio_intr_handler)(void *arg);
36
37/* Function declarations ----------------------------------------------------*/
38
47void GPIO_pinMode(gpio_num_t, gpio_mode_t, GPIO_INT_TYPE, gpio_intr_handler);
48
49#endif
void(* gpio_intr_handler)(void *arg)
GPIO interrupt handler callback function. The application should define it and provide it in GPIO_pin...
Definition: lib_gpio.h:35
void GPIO_pinMode(gpio_num_t, gpio_mode_t, GPIO_INT_TYPE, gpio_intr_handler)
Configure GPIO pin, mode, interrupt & interrupt handler.