source code migrating from gitlab
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "esp_log.h"
|
||||
#include "driver/gpio.h"
|
||||
|
||||
#define LED 2
|
||||
|
||||
void app_main(void) {
|
||||
const char *tag = "blink";
|
||||
ESP_LOGI(tag, "Starting blink!\n");
|
||||
|
||||
const uint32_t hi = 1, lo = 0;
|
||||
const TickType_t duration = 500 / portTICK_PERIOD_MS;
|
||||
|
||||
gpio_reset_pin(LED);
|
||||
gpio_set_direction(LED, GPIO_MODE_OUTPUT);
|
||||
|
||||
while (1) {
|
||||
gpio_set_level(LED, hi);
|
||||
vTaskDelay(duration);
|
||||
gpio_set_level(LED, lo);
|
||||
vTaskDelay(duration);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user