/* gpio example This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ #include #include #include #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/queue.h" #include "driver/gpio.h" #include "esp_log.h" #include "esp_system.h" static const char *TAG = "main"; /** * Brief: * This test code shows how to configure gpio and how to use gpio interrupt. * * GPIO status: * GPIO15: output * GPIO16: output * GPIO4: input, pulled up, interrupt from rising edge and falling edge * GPIO5: input, pulled up, interrupt from rising edge. * * Test: * Connect GPIO15 with GPIO4 * Connect GPIO16 with GPIO5 * Generate pulses on GPIO15/16, that triggers interrupt on GPIO4/5 * */ #define GPIO_OUTPUT_IO_0 15 #define GPIO_OUTPUT_IO_1 16 #define GPIO_OUTPUT_PIN_SEL ((1ULL<