OpenOCD
commands.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  end_state_command
 
struct  jtag_command
 
union  jtag_command_container
 Defines a container type that hold a pointer to a JTAG command structure of any defined type. More...
 
struct  pathmove_command
 
struct  reset_command
 
struct  runtest_command
 
struct  scan_command
 The scan_command provide a means of encapsulating a set of scan_field structures that should be scanned in/out to the device. More...
 
struct  sleep_command
 
struct  stableclocks_command
 
struct  statemove_command
 
struct  tms_command
 Encapsulates a series of bits to be clocked out, affecting state and mode of the interface. More...
 

Enumerations

enum  jtag_command_type {
  JTAG_SCAN = 1 , JTAG_TLR_RESET = 2 , JTAG_RUNTEST = 3 , JTAG_RESET = 4 ,
  JTAG_PATHMOVE = 6 , JTAG_SLEEP = 7 , JTAG_STABLECLOCKS = 8 , JTAG_TMS = 9
}
 The type of the jtag_command_container contained by a jtag_command structure. More...
 
enum  scan_type { SCAN_IN = 1 , SCAN_OUT = 2 , SCAN_IO = 3 }
 The inferred type of a scan_command structure, indicating whether the command has the host scan in from the device, the host scan out to the device, or both. More...
 

Functions

void * cmd_queue_alloc (size_t size)
 
int jtag_build_buffer (const struct scan_command *cmd, uint8_t **buffer)
 
struct jtag_commandjtag_command_queue_get (void)
 
void jtag_command_queue_reset (void)
 
void jtag_queue_command (struct jtag_command *cmd)
 
int jtag_read_buffer (uint8_t *buffer, const struct scan_command *cmd)
 
void jtag_scan_field_clone (struct scan_field *dst, const struct scan_field *src)
 Copy a struct scan_field for insertion into the queue. More...
 
unsigned int jtag_scan_size (const struct scan_command *cmd)
 
enum scan_type jtag_scan_type (const struct scan_command *cmd)
 

Enumeration Type Documentation

◆ jtag_command_type

The type of the jtag_command_container contained by a jtag_command structure.

Enumerator
JTAG_SCAN 
JTAG_TLR_RESET 
JTAG_RUNTEST 
JTAG_RESET 
JTAG_PATHMOVE 
JTAG_SLEEP 
JTAG_STABLECLOCKS 
JTAG_TMS 

Definition at line 128 of file commands.h.

◆ scan_type

enum scan_type

The inferred type of a scan_command structure, indicating whether the command has the host scan in from the device, the host scan out to the device, or both.

Enumerator
SCAN_IN 

From device to host,.

SCAN_OUT 

From host to device,.

SCAN_IO 

Full-duplex scan.

Definition at line 22 of file commands.h.

Function Documentation

◆ cmd_queue_alloc()

◆ jtag_build_buffer()

◆ jtag_command_queue_get()

struct jtag_command* jtag_command_queue_get ( void  )

Definition at line 150 of file commands.c.

References jtag_command_queue.

Referenced by default_interface_jtag_execute_queue().

◆ jtag_command_queue_reset()

void jtag_command_queue_reset ( void  )

◆ jtag_queue_command()

◆ jtag_read_buffer()

◆ jtag_scan_field_clone()

void jtag_scan_field_clone ( struct scan_field dst,
const struct scan_field src 
)

Copy a struct scan_field for insertion into the queue.

This allocates a new copy of out_value using cmd_queue_alloc.

Definition at line 160 of file commands.c.

References buf_cpy(), cmd_queue_alloc(), DIV_ROUND_UP, scan_field::in_value, scan_field::num_bits, and scan_field::out_value.

Referenced by esirisc_jtag_send(), interface_jtag_add_dr_scan(), and interface_jtag_add_ir_scan().

◆ jtag_scan_size()

unsigned int jtag_scan_size ( const struct scan_command cmd)

Definition at line 181 of file commands.c.

References cmd.

Referenced by angie_queue_scan(), jtag_build_buffer(), ulink_queue_scan(), and vdebug_jtag_scan().

◆ jtag_scan_type()