mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-27 10:48:35 +03:00
firmware: make the ngff beakout blink
..but only if the cardem sim is active Change-Id: I65f1fbeb06690a143ef4c792728c9cb917a4ffde
This commit is contained in:
@@ -31,7 +31,8 @@ enum led_pattern {
|
|||||||
BLINK_200O_F = 7,
|
BLINK_200O_F = 7,
|
||||||
BLINK_600O_F = 8,
|
BLINK_600O_F = 8,
|
||||||
BLINK_CUSTOM = 9,
|
BLINK_CUSTOM = 9,
|
||||||
BLINK_2F_O,
|
BLINK_2F_O = 10,
|
||||||
|
BLINK_5O_5F = 11,
|
||||||
_NUM_LED_BLINK
|
_NUM_LED_BLINK
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,10 @@ static const struct blink_state bs_on[] = {
|
|||||||
{ 0, 1 }
|
{ 0, 1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct blink_state bs_5on_5off[] = {
|
||||||
|
{ 500, 1 }, { 500, 0 }
|
||||||
|
};
|
||||||
|
|
||||||
static const struct blink_state bs_3on_5off[] = {
|
static const struct blink_state bs_3on_5off[] = {
|
||||||
{ 300, 1 }, { 500, 0 }
|
{ 300, 1 }, { 500, 0 }
|
||||||
};
|
};
|
||||||
@@ -107,6 +111,10 @@ static const struct blink_pattern patterns[] = {
|
|||||||
.states = bs_on,
|
.states = bs_on,
|
||||||
.size = ARRAY_SIZE(bs_on),
|
.size = ARRAY_SIZE(bs_on),
|
||||||
},
|
},
|
||||||
|
[BLINK_5O_5F] = {
|
||||||
|
.states = bs_5on_5off,
|
||||||
|
.size = ARRAY_SIZE(bs_5on_5off),
|
||||||
|
},
|
||||||
[BLINK_3O_5F] = {
|
[BLINK_3O_5F] = {
|
||||||
.states = bs_3on_5off,
|
.states = bs_3on_5off,
|
||||||
.size = ARRAY_SIZE(bs_3on_5off),
|
.size = ARRAY_SIZE(bs_3on_5off),
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ int sim_switch_use_physical(unsigned int nr, int physical)
|
|||||||
} else {
|
} else {
|
||||||
TRACE_INFO("%u: Use remote/emulated SIM\r\n", nr);
|
TRACE_INFO("%u: Use remote/emulated SIM\r\n", nr);
|
||||||
PIO_Configure(pins_cem, PIO_LISTSIZE(pins_cem));
|
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 */
|
/* just power cycle the modem because this circumvents weird issues with unreliable signals */
|
||||||
|
|||||||
Reference in New Issue
Block a user