LingYun Studio embeded system framwork software, such as thirdparty build shell and lingyun library
guowenxue
2024-08-21 d48b80fc277cb123738461b6125a58ffe9923019
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)