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

Change subject: sniffer: set LED pattern
......................................................................

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
---
M firmware/apps/trace/main.c
M firmware/libcommon/source/sniffer.c
2 files changed, 8 insertions(+), 3 deletions(-)

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



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 @@
        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 @@
        }

        /* Show activity on LED */
-       led_blink(LED_GREEN, BLINK_2O_F);
+       led_blink(LED_GREEN, BLINK_2F_O);

        /* Print message */
        switch (type) {

--
To view, visit https://gerrit.osmocom.org/9924
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: Ib1b6ff87fb92d6ed3ecae4bc89386206aaab508e
Gerrit-Change-Number: 9924
Gerrit-PatchSet: 6
Gerrit-Owner: Kévin Redon <kre...@sysmocom.de>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder

Reply via email to