X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fjtag%2Fcommands.h;fp=src%2Fjtag%2Fcommands.h;h=692eee430fbf8c101a99f35ecc8f425ec9aba847;hp=b10b545369e28643345fbc8bd7dfef4d44959258;hb=a3245bd7cdd2d8c3740c5e8f31efcd78de67837a;hpb=4a64820f230a267b1f2e36d4be567074e5b8cb76 diff --git a/src/jtag/commands.h b/src/jtag/commands.h index b10b545369..692eee430f 100644 --- a/src/jtag/commands.h +++ b/src/jtag/commands.h @@ -98,19 +98,39 @@ struct sleep_command { uint32_t us; }; +/** + * Encapsulates a series of bits to be clocked out, affecting state + * and mode of the interface. + * + * In JTAG mode these are clocked out on TMS, using TCK. They may be + * used for link resets, transitioning between JTAG and SWD modes, or + * to implement JTAG state machine transitions (implementing pathmove + * or statemove operations). + * + * In SWD mode these are clocked out on SWDIO, using SWCLK, and are + * used for link resets and transitioning between SWD and JTAG modes. + */ +struct tms_command { + /** How many bits should be clocked out. */ + unsigned num_bits; + /** The bits to clock out; the LSB is bit 0 of bits[0]. */ + const uint8_t *bits; +}; + /** * Defines a container type that hold a pointer to a JTAG command * structure of any defined type. */ union jtag_command_container { - struct scan_command* scan; - struct statemove_command* statemove; - struct pathmove_command* pathmove; - struct runtest_command* runtest; - struct stableclocks_command* stableclocks; - struct reset_command* reset; - struct end_state_command* end_state; - struct sleep_command* sleep; + struct scan_command *scan; + struct statemove_command *statemove; + struct pathmove_command *pathmove; + struct runtest_command *runtest; + struct stableclocks_command *stableclocks; + struct reset_command *reset; + struct end_state_command *end_state; + struct sleep_command *sleep; + struct tms_command *tms; }; /** @@ -124,7 +144,8 @@ enum jtag_command_type { JTAG_RESET = 4, JTAG_PATHMOVE = 6, JTAG_SLEEP = 7, - JTAG_STABLECLOCKS = 8 + JTAG_STABLECLOCKS = 8, + JTAG_TMS = 9, }; struct jtag_command {