Initial commit - sync AliceRC to Gitea

This commit is contained in:
2026-08-03 15:54:25 +08:00
commit 493b7d81d7
1510 changed files with 185319 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
/**
* @file led.c
* @brief Status LED control
*/
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
#include "esp_log.h"
#include "app_main.h"
static const char *TAG = "led";
void led_set(uint8_t on)
{
gpio_set_level(STATUS_LED_GPIO, on ? 1 : 0);
}
void led_blink(int times, int delay_ms)
{
for (int i = 0; i < times; i++) {
led_set(1);
vTaskDelay(pdMS_TO_TICKS(delay_ms));
led_set(0);
if (i < times - 1) {
vTaskDelay(pdMS_TO_TICKS(delay_ms));
}
}
}