Skip to content

Commit

Permalink
DAP: fill the UART capability info only when DAP_UART=1
Browse files Browse the repository at this point in the history
OpenOCD ends up considering info[1] as capabilities, which in this
case is equal zero.

Signed-off-by: Adrian Negreanu <[email protected]>
  • Loading branch information
Adrian Negreanu committed Dec 8, 2021
1 parent 160cc4d commit 8774a9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/daplink/cmsis-dap/DAP.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@ static uint8_t DAP_Info(uint8_t id, uint8_t *info) {
((TIMESTAMP_CLOCK != 0U) ? (1U << 5) : 0U) |
((SWO_STREAM != 0U) ? (1U << 6) : 0U) |
((DAP_UART != 0U) ? (1U << 7) : 0U);

length = 1U;
#if (DAP_UART != 0)
info[1] = ((DAP_UART_USB_COM_PORT != 0) ? (1U << 0) : 0U);
length = 2U;
#endif
break;
case DAP_ID_TIMESTAMP_CLOCK:
#if (TIMESTAMP_CLOCK != 0U)
Expand Down

0 comments on commit 8774a9e

Please sign in to comment.