mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
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
This commit is contained in:
@@ -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 |
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user