Skip to content

Commit 2893625

Browse files
author
Mirko Jelinek
committed
LED selftest at startup was implemented.
1 parent 2c31a2b commit 2893625

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/DAP42.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ int main(void) {
8181
tick_setup(1000);
8282
gpio_setup();
8383
led_num(0);
84-
84+
8585
if (CDC_AVAILABLE) {
8686
console_setup(DEFAULT_BAUDRATE);
8787
}
@@ -97,8 +97,6 @@ int main(void) {
9797
retarget(STDERR_FILENO, CONSOLE_USART);
9898
}
9999

100-
led_num(1);
101-
102100
{
103101
char serial[USB_SERIAL_NUM_LENGTH+1];
104102
desig_get_unique_id_as_string(serial, USB_SERIAL_NUM_LENGTH+1);
@@ -127,6 +125,16 @@ int main(void) {
127125

128126
tick_start();
129127

128+
#if defined(SBDAP)
129+
led_num(1);
130+
wait_ms(200);
131+
led_num(5);
132+
wait_ms(200);
133+
led_num(7);
134+
wait_ms(500);
135+
led_num(0);
136+
#endif
137+
130138
/* Enable the watchdog to enable DFU recovery from bad firmware images */
131139
iwdg_set_period_ms(1000);
132140
iwdg_start();

0 commit comments

Comments
 (0)