From be98d13782b05e7659f601980ef695a493d6bee1 Mon Sep 17 00:00:00 2001 From: guowenxue <guowenxue@gmail.com> Date: Wed, 21 Aug 2024 17:29:28 +0800 Subject: [PATCH] Add infrared source code --- hal/api/led.c | 19 +++++++++---------- 1 files changed, 9 insertions(+), 10 deletions(-) diff --git a/hal/api/led.c b/hal/api/led.c index 16fe2f4..363cbb1 100644 --- a/hal/api/led.c +++ b/hal/api/led.c @@ -5,12 +5,11 @@ * Filename: led.c * Description: This file is used to control RGB 3-colors LED * - * * Pin connection: - * RGB Led Module IGKBoard - * R <-----> #Pin33 - * G <-----> #Pin35 - * B <-----> #Pin37 + * RGB Led Module IGKBoard-IMX6ULL + * R <-----> #Pin36 (GPIO1_IO11) + * G <-----> #Pin38 (GPIO1_IO10) + * B <-----> #Pin40 (GPIO5_IO09) * GND <-----> GND * ********************************************************************************/ @@ -72,18 +71,18 @@ *| Leds API based on libgpiod v2.0 | *+---------------------------------+*/ -static led_t leds_info[LEDCNT] = +static led_t leds_info[LED_CNT] = { - {"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 */ + {"red", 0, 11, ACTIVE_HIGH, 0, NULL}, /* #Pin36, GPIO1_IO11 on chip0 line 11, active high */ + {"green", 0, 10, ACTIVE_HIGH, 0, NULL}, /* #Pin38, GPIO1_IO10 on chip0 line 10, active high */ + {"blue", 4, 9, ACTIVE_HIGH, 0, NULL}, /* #Pin40, GPIO5_IO09 on chip4 line 09, active high */ }; /* Leds context */ static leds_t leds = { .leds = leds_info, - .count = LEDCNT, + .count = LED_CNT, }; int init_led(void) -- Gitblit v1.9.1