Where enabled: Add calls to set the various xxx_LED status lines as GPIO outputs

Signed-off-by: Andrew Burge <andrew.burge@raspberrypi.com>
diff --git a/include/DAP_config.h b/include/DAP_config.h
index 376392a..0dd272a 100755
--- a/include/DAP_config.h
+++ b/include/DAP_config.h
@@ -562,6 +562,15 @@
 */
 __STATIC_INLINE void DAP_SETUP (void) {
   probe_gpio_init();
+
+#ifdef PROBE_DAP_CONNECTED_LED
+    gpio_init(PROBE_DAP_CONNECTED_LED);
+    gpio_set_dir(PROBE_DAP_CONNECTED_LED, GPIO_OUT);
+#endif
+#ifdef PROBE_DAP_RUNNING_LED
+    gpio_init(PROBE_DAP_RUNNING_LED);
+    gpio_set_dir(PROBE_DAP_RUNNING_LED, GPIO_OUT);
+#endif
 }
 
 /** Reset Target Device with custom specific I/O pin or command sequence.
diff --git a/src/cdc_uart.c b/src/cdc_uart.c
index 6dc6534..ba44e4b 100644
--- a/src/cdc_uart.c
+++ b/src/cdc_uart.c
@@ -58,6 +58,17 @@
     gpio_set_pulls(PROBE_UART_RX, 1, 0);
     uart_init(PROBE_UART_INTERFACE, PROBE_UART_BAUDRATE);
 
+#ifdef PROBE_UART_TX_LED
+    tx_led_debounce = 0;
+    gpio_init(PROBE_UART_TX_LED);
+    gpio_set_dir(PROBE_UART_TX_LED, GPIO_OUT);
+#endif
+#ifdef PROBE_UART_RX_LED
+    rx_led_debounce = 0;
+    gpio_init(PROBE_UART_RX_LED);
+    gpio_set_dir(PROBE_UART_RX_LED, GPIO_OUT);
+#endif
+
 #ifdef PROBE_UART_HWFC
     /* HWFC implies that hardware flow control is implemented and the
      * UART operates in "full-duplex" mode (See USB CDC PSTN120 6.3.12).
diff --git a/src/main.c b/src/main.c
index 927f9f8..5204d69 100644
--- a/src/main.c
+++ b/src/main.c
@@ -61,6 +61,10 @@
 
 void usb_thread(void *ptr)
 {
+#ifdef PROBE_USB_CONNECTED_LED
+    gpio_init(PROBE_USB_CONNECTED_LED);
+    gpio_set_dir(PROBE_USB_CONNECTED_LED, GPIO_OUT);
+#endif
     TickType_t wake;
     wake = xTaskGetTickCount();
     do {