aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Wild <ewild@sysmocom.de>2021-07-26 23:54:51 +0200
committerlaforge <laforge@osmocom.org>2021-08-02 09:22:46 +0000
commit1ad205e68289c57c0754d97f671b949d1efa9098 (patch)
tree4160f438db0ba947194e495482c0c63da4e18079
parent34317c1f3243ecd3d462268fffe90ddbf7648570 (diff)
firmware: make the ngff beakout blink
..but only if the cardem sim is active Change-Id: I65f1fbeb06690a143ef4c792728c9cb917a4ffde
-rw-r--r--firmware/libboard/common/include/led.h3
-rw-r--r--firmware/libboard/common/source/led.c8
-rw-r--r--firmware/libboard/ngff_cardem/source/sim_switch.c2
3 files changed, 11 insertions, 2 deletions
diff --git a/firmware/libboard/common/include/led.h b/firmware/libboard/common/include/led.h
index 339702d..1ade823 100644
--- a/firmware/libboard/common/include/led.h
+++ b/firmware/libboard/common/include/led.h
@@ -31,7 +31,8 @@ enum led_pattern {
BLINK_200O_F = 7,
BLINK_600O_F = 8,
BLINK_CUSTOM = 9,
- BLINK_2F_O,
+ BLINK_2F_O = 10,
+ BLINK_5O_5F = 11,
_NUM_LED_BLINK
};
diff --git a/firmware/libboard/common/source/led.c b/firmware/libboard/common/source/led.c
index 6772007..4822a6d 100644
--- a/firmware/libboard/common/source/led.c
+++ b/firmware/libboard/common/source/led.c
@@ -58,6 +58,10 @@ static const struct blink_state bs_on[] = {
{ 0, 1 }
};
+static const struct blink_state bs_5on_5off[] = {
+ { 500, 1 }, { 500, 0 }
+};
+
static const struct blink_state bs_3on_5off[] = {
{ 300, 1 }, { 500, 0 }
};
@@ -107,6 +111,10 @@ static const struct blink_pattern patterns[] = {
.states = bs_on,
.size = ARRAY_SIZE(bs_on),
},
+ [BLINK_5O_5F] = {
+ .states = bs_5on_5off,
+ .size = ARRAY_SIZE(bs_5on_5off),
+ },
[BLINK_3O_5F] = {
.states = bs_3on_5off,
.size = ARRAY_SIZE(bs_3on_5off),
diff --git a/firmware/libboard/ngff_cardem/source/sim_switch.c b/firmware/libboard/ngff_cardem/source/sim_switch.c
index eb2d305..cc4860a 100644
--- a/firmware/libboard/ngff_cardem/source/sim_switch.c
+++ b/firmware/libboard/ngff_cardem/source/sim_switch.c
@@ -61,7 +61,7 @@ int sim_switch_use_physical(unsigned int nr, int physical)
} else {
TRACE_INFO("%u: Use remote/emulated SIM\r\n", nr);
PIO_Configure(pins_cem, PIO_LISTSIZE(pins_cem));
- led_blink(led, BLINK_ALWAYS_OFF);
+ led_blink(led, BLINK_5O_5F);
}
/* just power cycle the modem because this circumvents weird issues with unreliable signals */