mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
LED: Introduce LED blinking pattern code
It might be useful to display some different blinking patterns to indicate specific system state (such as DFU mode vs. regular firmware)
This commit is contained in:
@@ -177,10 +177,9 @@ extern int main(void)
|
||||
uint8_t isUsbConnected = 0;
|
||||
unsigned int i = 0;
|
||||
|
||||
LED_Configure(LED_NUM_RED);
|
||||
LED_Configure(LED_NUM_GREEN);
|
||||
LED_Set(LED_NUM_RED);
|
||||
|
||||
led_init();
|
||||
led_blink(LED_GREEN, BLINK_3O_30F);
|
||||
led_blink(LED_RED, BLINK_3O_30F);
|
||||
|
||||
/* Enable watchdog for 500ms, with no window */
|
||||
WDT_Enable(WDT, WDT_MR_WDRSTEN | WDT_MR_WDDBGHLT | WDT_MR_WDIDLEHLT |
|
||||
@@ -243,8 +242,6 @@ extern int main(void)
|
||||
}
|
||||
} else if (isUsbConnected == 0) {
|
||||
TRACE_INFO("USB is now configured\n\r");
|
||||
LED_Set(LED_NUM_GREEN);
|
||||
LED_Clear(LED_NUM_RED);
|
||||
|
||||
isUsbConnected = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user