Skip to content

Commit 798b9e7

Browse files
authored
DAP: CMSIS-DAP 2.1 work-around #911
Fill the UART capability info only when DAP_UART=1 and DAP_UART_USB_COM_PORT=1
2 parents 193bb7a + 280a20d commit 798b9e7

File tree

1 file changed

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

1 file changed

+4
-1
lines changed

source/daplink/cmsis-dap/DAP.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,12 @@ 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+
#if ((DAP_UART != 0) && (DAP_UART_USB_COM_PORT != 0))
114114
info[1] = ((DAP_UART_USB_COM_PORT != 0) ? (1U << 0) : 0U);
115115
length = 2U;
116+
#else
117+
length = 1U;
118+
#endif
116119
break;
117120
case DAP_ID_TIMESTAMP_CLOCK:
118121
#if (TIMESTAMP_CLOCK != 0U)

0 commit comments

Comments
 (0)