aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKévin Redon <kredon@sysmocom.de>2018-07-08 16:32:20 +0200
committerKévin Redon <kredon@sysmocom.de>2018-07-11 22:01:58 +0200
commitda5578bd85bc400e1d2c1eb6bea28c6777453b80 (patch)
treefc9823e4e22b827a2bf42e754d542bbecb9cbcf7
parentd9754115119e5fa02e64727656765603f6eb7a97 (diff)
sniffer: set LED pattern
The red and green LEDs are now used as follows: - red on = power (firmware is running) - red blink = error detected (e.g. during ISO-7816 parsing) - green on = running (sniffer mode is running) - green blink = activity (e.g. USB message sent) Change-Id: Ib1b6ff87fb92d6ed3ecae4bc89386206aaab508e
-rw-r--r--firmware/apps/trace/main.c9
-rw-r--r--firmware/libcommon/source/sniffer.c2
2 files changed, 8 insertions, 3 deletions
diff --git a/firmware/apps/trace/main.c b/firmware/apps/trace/main.c
index 6b6d70b..f7eb15d 100644
--- a/firmware/apps/trace/main.c
+++ b/firmware/apps/trace/main.c
@@ -142,10 +142,15 @@ extern int main(void)
enum confNum last_simtrace_config = simtrace_config;
unsigned int i = 0;
- /* Configure LED output (red = on, green = activity */
+ /* Configure LED output
+ * red on = power
+ * red blink = error
+ * green on = running
+ * green blink = activity
+ */
led_init();
led_blink(LED_RED, BLINK_ALWAYS_ON);
- led_blink(LED_GREEN, BLINK_ALWAYS_OFF);
+ led_blink(LED_GREEN, BLINK_ALWAYS_ON);
/* Enable watchdog for 2000 ms, with no window */
WDT_Enable(WDT, WDT_MR_WDRSTEN | WDT_MR_WDDBGHLT | WDT_MR_WDIDLEHLT |
diff --git a/firmware/libcommon/source/sniffer.c b/firmware/libcommon/source/sniffer.c
index 8262bec..9202d8e 100644
--- a/firmware/libcommon/source/sniffer.c
+++ b/firmware/libcommon/source/sniffer.c
@@ -302,7 +302,7 @@ static void usb_send_data(enum simtrace_msg_type_sniff type, const uint8_t* data
}
/* Show activity on LED */
- led_blink(LED_GREEN, BLINK_2O_F);
+ led_blink(LED_GREEN, BLINK_2F_O);
/* Print message */
switch (type) {