From 5b0985618c8a49ea5ff872486672324120e25361 Mon Sep 17 00:00:00 2001 From: guowenxue <guowenxue@gmail.com> Date: Mon, 10 Jul 2023 15:24:32 +0800 Subject: [PATCH] add gpsd program and booster --- modules/c/led.h | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/c/led.h b/modules/c/led.h index 8e3b4fa..125d80d 100644 --- a/modules/c/led.h +++ b/modules/c/led.h @@ -5,13 +5,13 @@ * Filename: led.h * Description: This file is used to control RGB 3-colours LED * - * pi@raspberrypi:~ $ gpio readall show BCM and wPi pinmap + * pi@raspberrypi:~ $ gpio readall #show BCM and wPi pinmap * - * LED BCM wPi - * B ---- GPIO.13 ---- GPIO.23 - * R ---- GPIO.19 ---- GPIO.24 - * G ---- GPIO.26 ---- GPIO.25 - * I ---- GND ---- + * LED #PIN BCM wPi + * I ---- 9 ---- GND ---- GND + * G ---- 11 ---- 17 ---- 0 + * R ---- 13 ---- 27 ---- 2 + * B ---- 15 ---- 22 ---- 3 * * Version: 1.0.0(2018/10/14) * Author: Guo Wenxue <guowenxue@gmail.com> @@ -25,6 +25,7 @@ #define OFF 0 #define ON 1 + /* Three LEDs code */ enum { @@ -36,8 +37,12 @@ /* 3 LEDs WiringPi GPIO port */ - /* LED_R LED_G LED_B */ -static int led_gpio[LED_MAX]= { 24, 25, 23 }; + +#ifdef CONFIG_USE_WIRINGPI +static int led_gpio[LED_MAX]= { 2, 0, 3 }; +#else /* use libgpiod library */ +static int led_gpio[LED_MAX]= { 27, 17, 22 }; +#endif void init_led(void); -- Gitblit v1.9.1