Skip to content

Commit 8774a9e

Browse files
author
Adrian Negreanu
committed
DAP: fill the UART capability info only when DAP_UART=1
OpenOCD ends up considering info[1] as capabilities, which in this case is equal zero. Signed-off-by: Adrian Negreanu <[email protected]>
1 parent 160cc4d commit 8774a9e

File tree

1 file changed

+3
-1
lines changed
  • source/daplink/cmsis-dap

1 file changed

+3
-1
lines changed

source/daplink/cmsis-dap/DAP.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,11 @@ static uint8_t DAP_Info(uint8_t id, uint8_t *info) {
110110
((TIMESTAMP_CLOCK != 0U) ? (1U << 5) : 0U) |
111111
((SWO_STREAM != 0U) ? (1U << 6) : 0U) |
112112
((DAP_UART != 0U) ? (1U << 7) : 0U);
113-
113+
length = 1U;
114+
#if (DAP_UART != 0)
114115
info[1] = ((DAP_UART_USB_COM_PORT != 0) ? (1U << 0) : 0U);
115116
length = 2U;
117+
#endif
116118
break;
117119
case DAP_ID_TIMESTAMP_CLOCK:
118120
#if (TIMESTAMP_CLOCK != 0U)

0 commit comments

Comments
 (0)