Browse Source

V4: Duplicate Act LED on TX pin when not in debug mode.
Fixes #1

Keir Fraser 3 years ago
parent
commit
4697163304
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/board.c

+ 8 - 0
src/board.c

@@ -92,12 +92,20 @@ void board_init(void)
 
     /* Activity LED is active low. */
     gpio_configure_pin(gpio_led, pin_led, GPO_pushpull(IOSPD_LOW, HIGH));
+#if defined(NDEBUG) && MCU == AT32F4
+    if (at32f4_series != AT32F415)
+        gpio_configure_pin(gpioa, 9, GPO_pushpull(IOSPD_LOW, HIGH));
+#endif
 }
 
 /* Set the activity LED status. */
 void act_led(bool_t on)
 {
     gpio_write_pin(gpio_led, pin_led, on ? LOW : HIGH);
+#if defined(NDEBUG) && MCU == AT32F4
+    if (at32f4_series != AT32F415)
+        gpio_write_pin(gpioa, 9, on ? LOW : HIGH);
+#endif
 }
 
 /*