-#ifdef INCLUDE_JTAG_INTERFACE_H
-
-enum scan_type {
- /* IN: from device to host, OUT: from host to device */
- SCAN_IN = 1, SCAN_OUT = 2, SCAN_IO = 3
-};
-
-typedef struct scan_command_s
-{
- bool ir_scan; /* instruction/not data scan */
- int num_fields; /* number of fields in *fields array */
- scan_field_t* fields; /* pointer to an array of data scan fields */
- tap_state_t end_state; /* TAP state in which JTAG commands should finish */
-} scan_command_t;
-
-typedef struct statemove_command_s
-{
- tap_state_t end_state; /* TAP state in which JTAG commands should finish */
-} statemove_command_t;
-
-typedef struct pathmove_command_s
-{
- int num_states; /* number of states in *path */
- tap_state_t* path; /* states that have to be passed */
-} pathmove_command_t;
-
-typedef struct runtest_command_s
-{
- int num_cycles; /* number of cycles that should be spent in Run-Test/Idle */
- tap_state_t end_state; /* TAP state in which JTAG commands should finish */
-} runtest_command_t;
-
-
-typedef struct stableclocks_command_s
-{
- int num_cycles; /* number of clock cycles that should be sent */
-} stableclocks_command_t;
-
-
-typedef struct reset_command_s
-{
- int trst; /* trst/srst 0: deassert, 1: assert, -1: don't change */
- int srst;
-} reset_command_t;
-
-typedef struct end_state_command_s
-{
- tap_state_t end_state; /* TAP state in which JTAG commands should finish */
-} end_state_command_t;
-
-typedef struct sleep_command_s
-{
- u32 us; /* number of microseconds to sleep */
-} sleep_command_t;
-
-typedef union jtag_command_container_u
-{
- scan_command_t* scan;
- statemove_command_t* statemove;
- pathmove_command_t* pathmove;
- runtest_command_t* runtest;
- stableclocks_command_t* stableclocks;
- reset_command_t* reset;
- end_state_command_t* end_state;
- sleep_command_t* sleep;
-} jtag_command_container_t;
-
-enum jtag_command_type {
- JTAG_SCAN = 1,
- JTAG_STATEMOVE = 2,
- JTAG_RUNTEST = 3,
- JTAG_RESET = 4,
- JTAG_PATHMOVE = 6,
- JTAG_SLEEP = 7,
- JTAG_STABLECLOCKS = 8
-};
-
-typedef struct jtag_command_s
-{
- jtag_command_container_t cmd;
- enum jtag_command_type type;
- struct jtag_command_s* next;
-} jtag_command_t;
-
-extern jtag_command_t* jtag_command_queue;
-
-extern void* cmd_queue_alloc(size_t size);
-extern void cmd_queue_free(void);
-
-extern void jtag_queue_command(jtag_command_t *cmd);
-extern void jtag_command_queue_reset(void);
-
-#include "interface.h"
-
-#endif // INCLUDE_JTAG_INTERFACE_H
-
-/* forward declaration */