Skip to content

Commit 280a20d

Browse files
committed
DAP: also check DAP_UART_USB_COM_PORT=1 before addomg UART capability info
1 parent 2dd6d1b commit 280a20d

File tree

1 file changed

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

1 file changed

+3
-2
lines changed

source/daplink/cmsis-dap/DAP.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +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-
length = 1U;
114-
#if (DAP_UART != 0)
113+
#if ((DAP_UART != 0) && (DAP_UART_USB_COM_PORT != 0))
115114
info[1] = ((DAP_UART_USB_COM_PORT != 0) ? (1U << 0) : 0U);
116115
length = 2U;
116+
#else
117+
length = 1U;
117118
#endif
118119
break;
119120
case DAP_ID_TIMESTAMP_CLOCK:

0 commit comments

Comments
 (0)