Skip to content

Commit

Permalink
hosted/jlink: add extra interface strings
Browse files Browse the repository at this point in the history
From libjaylink
  • Loading branch information
perigoso authored and dragonmux committed Jul 28, 2023
1 parent 894f33b commit f1ec3d4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/platforms/hosted/jlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,18 @@ static char *jlink_interface_to_string(const uint8_t interface)
return "JTAG";
case JLINK_INTERFACE_SWD:
return "SWD";
case JLINK_INTERFACE_BDM3:
return "BDM3";
case JLINK_INTERFACE_FINE:
return "FINE";
case JLINK_INTERFACE_2W_JTAG_PIC32:
return "PIC32 2-wire JTAG";
case JLINK_INTERFACE_SPI:
return "SPI";
case JLINK_INTERFACE_C2:
return "C2";
case JLINK_INTERFACE_CJTAG:
return "cJTAG";
default:
return "Unknown";
}
Expand Down
7 changes: 7 additions & 0 deletions src/platforms/hosted/jlink_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,13 @@
#define JLINK_INTERFACE_MAX 32U
#define JLINK_INTERFACE_JTAG 0U
#define JLINK_INTERFACE_SWD 1U
/* The following interfaces were obtained from libjaylink, with no official documentation to back them up */
#define JLINK_INTERFACE_BDM3 2U /* Background Debug Mode 3 (BDM3) */
#define JLINK_INTERFACE_FINE 3U /* Renesas’ single-wire debug interface (FINE) */
#define JLINK_INTERFACE_2W_JTAG_PIC32 4U /* 2-wire JTAG for PIC32 compliant devices */
#define JLINK_INTERFACE_SPI 5U /* Serial Peripheral Interface (SPI) */
#define JLINK_INTERFACE_C2 6U /* Silicon Labs 2-wire interface (C2) */
#define JLINK_INTERFACE_CJTAG 7U /* Compact JTAG (cJTAG) */

/* Kickstart power - JLINK_CMD_POWER_SET_KICKSTART */
#define JLINK_POWER_KICKSTART_ENABLE 0x01U /* Set Kickstart power on */
Expand Down

0 comments on commit f1ec3d4

Please sign in to comment.