From 5e7050e3c9ec8c1e35a80f9cdd1ab0c918f3e060 Mon Sep 17 00:00:00 2001 From: guowenxue <guowenxue@gmail.com> Date: Wed, 21 Aug 2024 16:32:06 +0800 Subject: [PATCH] Add relay source code --- hal/api/led.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hal/api/leds.c b/hal/api/led.c similarity index 95% rename from hal/api/leds.c rename to hal/api/led.c index 5905885..16fe2f4 100644 --- a/hal/api/leds.c +++ b/hal/api/led.c @@ -24,7 +24,10 @@ #include <time.h> #include <errno.h> #include <signal.h> -#include "leds.h" +#include <getopt.h> +#include <libgen.h> + +#include "led.h" int g_stop = 0; @@ -71,9 +74,9 @@ static led_t leds_info[LEDCNT] = { - {"red", 0, 23, ACTIVE_HIGH, 0, NULL}, /* GPIO1_IO23 on chip0 line 23, active high */ - {"green", 4, 1, ACTIVE_HIGH, 0, NULL}, /* GPIO5_IO01 on chip4 line 1, active high */ - {"blue", 4, 8, ACTIVE_HIGH, 0, NULL}, /* GPIO5_IO08 on chip4 line 8, active high */ + {"red", 0, 23, ACTIVE_HIGH, 0, NULL}, /* #31, GPIO1_IO23 on chip0 line 23, active high */ + {"green", 4, 1, ACTIVE_HIGH, 0, NULL}, /* #33, GPIO5_IO01 on chip4 line 1, active high */ + {"blue", 4, 8, ACTIVE_HIGH, 0, NULL}, /* #35, GPIO5_IO08 on chip4 line 8, active high */ }; /* Leds context */ -- Gitblit v1.9.1