20 lines
522 B
C
20 lines
522 B
C
#include "freertos/idf_additions.h"
|
|
#include "portmacro.h"
|
|
#include <driver/gpio.h>
|
|
#include <esp_rom_gpio.h>
|
|
#include <freertos/FreeRTOS.h>
|
|
#include <freertos/task.h>
|
|
|
|
#include "tasks.h"
|
|
|
|
void task_blink(void *pvParams) {
|
|
esp_rom_gpio_pad_select_gpio(LED_PIN);
|
|
gpio_set_direction(LED_PIN, GPIO_MODE_OUTPUT);
|
|
|
|
while (1) {
|
|
gpio_set_level(LED_PIN, 0);
|
|
vTaskDelay(BLINK_DELAY / portTICK_PERIOD_MS);
|
|
gpio_set_level(LED_PIN, 1);
|
|
vTaskDelay(BLINK_DELAY / portTICK_PERIOD_MS);
|
|
}
|
|
}
|