Change in simtrace2[master]: LED: add short LED pulse blinking pattern

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Jul 4 15:07:23 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/9864 )

Change subject: LED: add short LED pulse blinking pattern
......................................................................

LED: add short LED pulse blinking pattern

Change-Id: I0fdc2f902a3b92da6aa9b9c8500abae8a2f79447
---
M firmware/libboard/common/include/led.h
M firmware/libboard/common/source/led.c
2 files changed, 17 insertions(+), 9 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/firmware/libboard/common/include/led.h b/firmware/libboard/common/include/led.h
index d1db039..4e29c0e 100644
--- a/firmware/libboard/common/include/led.h
+++ b/firmware/libboard/common/include/led.h
@@ -13,9 +13,10 @@
 	BLINK_3O_30F		= 3,
 	BLINK_3O_1F_3O_30F	= 4,
 	BLINK_3O_1F_3O_1F_3O_30F= 5,
-	BLINK_200O_F		= 6,
-	BLINK_600O_F		= 7,
-	BLINK_CUSTOM		= 8,
+	BLINK_2O_F		= 6,
+	BLINK_200O_F		= 7,
+	BLINK_600O_F		= 8,
+	BLINK_CUSTOM		= 9,
 	_NUM_LED_BLINK
 };
 
diff --git a/firmware/libboard/common/source/led.c b/firmware/libboard/common/source/led.c
index e4d2d57..540f031 100644
--- a/firmware/libboard/common/source/led.c
+++ b/firmware/libboard/common/source/led.c
@@ -27,7 +27,7 @@
 struct blink_state {
 	/* duration of the state in ms */
 	uint16_t duration;
-	/* bringhtness of LED during the state */
+	/* brightness of LED during the state */
 	uint8_t on;
 } __attribute__((packed));
 
@@ -54,6 +54,9 @@
 static const struct blink_state bs_3on_1off_3on_1off_3on_30off[] = {
 	{ 300, 1 }, { 100, 0 }, { 300, 1 }, { 100, 0 }, { 300, 1 }, { 3000, 0 }
 };
+static const struct blink_state bs_2on_off[] = {
+	{ 200, 1 }, { 0, 0 },
+};
 static const struct blink_state bs_200on_off[] = {
 	{ 20000, 1 }, { 0, 0 },
 };
@@ -94,6 +97,10 @@
 		.states = bs_3on_1off_3on_1off_3on_30off,
 		.size = ARRAY_SIZE(bs_3on_1off_3on_1off_3on_30off),
 	},
+	[BLINK_2O_F] = {
+		.states = bs_2on_off,
+		.size = ARRAY_SIZE(bs_2on_off),
+	},
 	[BLINK_200O_F] = {
 		.states = bs_200on_off,
 		.size = ARRAY_SIZE(bs_200on_off),
@@ -158,16 +165,16 @@
 }
 
 static struct led_state led_state[] = {
-	[LED_GREEN] = {
-		.led = LED_GREEN,
-		.timer.cb = blink_tmr_cb,
-		.timer.data = &led_state[LED_GREEN],
-	},
 	[LED_RED] = {
 		.led = LED_RED,
 		.timer.cb = blink_tmr_cb,
 		.timer.data = &led_state[LED_RED],
 	},
+	[LED_GREEN] = {
+		.led = LED_GREEN,
+		.timer.cb = blink_tmr_cb,
+		.timer.data = &led_state[LED_GREEN],
+	},
 };
 #endif /* PINS_LEDS */
 

-- 
To view, visit https://gerrit.osmocom.org/9864
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0fdc2f902a3b92da6aa9b9c8500abae8a2f79447
Gerrit-Change-Number: 9864
Gerrit-PatchSet: 5
Gerrit-Owner: Kévin Redon <kredon at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Kévin Redon <kredon at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180704/1239c426/attachment.htm>


More information about the gerrit-log mailing list