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

Signed-off-by: Andrew Burge <andrew.burge@raspberrypi.com>
This commit is contained in:
Andrew Burge
2024-11-27 10:05:13 +00:00
committed by Jonathan Bell
parent 152f85d2ec
commit 65b1e73589
3 changed files with 24 additions and 0 deletions

View File

@@ -562,6 +562,15 @@ Status LEDs. In detail the operation of Hardware I/O and LED pins are enabled an
*/
__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.

View File

@@ -58,6 +58,17 @@ void cdc_uart_init(void) {
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).

View File

@@ -61,6 +61,10 @@ TaskHandle_t dap_taskhandle, tud_taskhandle;
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 {