From f7889e2ceddbc3e15ea4b5377d831f4432169f76 Mon Sep 17 00:00:00 2001
From: Guo Wenxue <guowenxue@gmail.com>
Date: Sat, 04 Jan 2025 16:26:42 +0800
Subject: [PATCH] Update iotd program configure file
---
modules/leds.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/modules/leds.c b/modules/leds.c
index 6f68356..8c3c7b0 100644
--- a/modules/leds.c
+++ b/modules/leds.c
@@ -13,6 +13,12 @@
* B <-----> #Pin37(BCM GPIO26)
* GND <-----> GND
*
+ * RGB Led Module Raspberry Pi Board
+ * R <-----> #Pin36(BCM GPIO16)
+ * G <-----> #Pin38(BCM GPIO20)
+ * B <-----> #Pin40(BCM GPIO21)
+ * GND <-----> GND
+ *
* System install:
* sudo apt install -y libgpiod-dev gpiod
*
@@ -54,11 +60,20 @@
struct gpiod_line *line; /* libgpiod line */
} led_info_t;
+#define CONFIG_PIN_333537
+//#define CONFIG_PIN_363840
+
static led_info_t leds_info[LEDCNT] =
{
+#ifdef CONFIG_PIN_333537
{"red", 13, 1, NULL },
{"green", 19, 1, NULL },
{"blue", 26, 1, NULL },
+#elif (defined CONFIG_PIN_363840)
+ {"red", 16, 1, NULL },
+ {"green", 20, 1, NULL },
+ {"blue", 21, 1, NULL },
+#endif
};
/* Three LEDs API context */
--
Gitblit v1.9.1