/* Blink 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 <stdio.h>
#include "freertos/FreeRTOS.h"
#include "driver/gpio.h"
#define LED_PIN GPIO_NUM_2
#define BLINK_TIME 1000
extern "C" void app_main()
{
uint8_t led_value = 0;
gpio_reset_pin(LED_PIN);
gpio_set_direction(LED_PIN, GPIO_MODE_OUTPUT);
while (1) {
gpio_set_level(LED_PIN, led_value);
led_value = !led_value;
vTaskDelay(BLINK_TIME / portTICK_PERIOD_MS);
}
}