aboutsummaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorKévin Redon <kredon@sysmocom.de>2018-07-08 16:29:37 +0200
committerKévin Redon <kredon@sysmocom.de>2018-07-11 22:01:58 +0200
commitd9754115119e5fa02e64727656765603f6eb7a97 (patch)
treedb36806d812abec9cc094e4bf6bb1f23040ea8da /firmware
parenta2fccba96c144e34cadc7c801fcf3eefc41311e0 (diff)
LED: add need pattern
new LED pattern: off for 200 ms and then on Change-Id: Id2c40dc20d75ed6f38b735164ad1eb2860dc480c
Diffstat (limited to 'firmware')
-rw-r--r--firmware/libboard/common/include/led.h1
-rw-r--r--firmware/libboard/common/source/led.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/firmware/libboard/common/include/led.h b/firmware/libboard/common/include/led.h
index 0c851f0..339702d 100644
--- a/firmware/libboard/common/include/led.h
+++ b/firmware/libboard/common/include/led.h
@@ -31,6 +31,7 @@ enum led_pattern {
BLINK_200O_F = 7,
BLINK_600O_F = 8,
BLINK_CUSTOM = 9,
+ BLINK_2F_O,
_NUM_LED_BLINK
};
diff --git a/firmware/libboard/common/source/led.c b/firmware/libboard/common/source/led.c
index e3293b6..6772007 100644
--- a/firmware/libboard/common/source/led.c
+++ b/firmware/libboard/common/source/led.c
@@ -73,16 +73,23 @@ static const struct blink_state bs_3on_1off_3on_30off[] = {
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 },
};
+
static const struct blink_state bs_600on_off[] = {
{ 60000, 1 }, { 0, 0 },
};
+static const struct blink_state bs_2off_on[] = {
+ { 200, 0 }, { 0, 1 },
+};
+
/* a blink pattern is an array of blink_states */
struct blink_pattern {
@@ -128,6 +135,11 @@ static const struct blink_pattern patterns[] = {
.states = bs_600on_off,
.size = ARRAY_SIZE(bs_600on_off),
},
+ [BLINK_2F_O] = {
+ .states = bs_2off_on,
+ .size = ARRAY_SIZE(bs_2off_on),
+ },
+
};
struct led_state {