OpenOCD
commands.c File Reference
Include dependency graph for commands.c:

Go to the source code of this file.

Data Structures

struct  cmd_queue_page
 

Macros

#define ALIGN_SIZE   (sizeof(union worse_case_align))
 
#define CMD_QUEUE_PAGE_SIZE   (1024 * 1024)
 

Functions

void * cmd_queue_alloc (size_t size)
 
static void cmd_queue_free (void)
 
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...
 
int jtag_scan_size (const struct scan_command *cmd)
 
enum scan_type jtag_scan_type (const struct scan_command *cmd)
 

Variables

static struct cmd_queue_pagecmd_queue_pages
 
static struct cmd_queue_pagecmd_queue_pages_tail
 
static struct jtag_commandjtag_command_queue
 
static struct jtag_command ** next_command_pointer = &jtag_command_queue
 

Macro Definition Documentation

◆ ALIGN_SIZE

#define ALIGN_SIZE   (sizeof(union worse_case_align))

◆ CMD_QUEUE_PAGE_SIZE

#define CMD_QUEUE_PAGE_SIZE   (1024 * 1024)

Definition at line 32 of file commands.c.

Function Documentation

◆ cmd_queue_alloc()

◆ cmd_queue_free()

static void cmd_queue_free ( void  )
static

◆ 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()

int jtag_scan_size ( const struct scan_command cmd)

Definition at line 182 of file commands.c.

References cmd.

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

◆ jtag_scan_type()

Variable Documentation

◆ cmd_queue_pages

struct cmd_queue_page* cmd_queue_pages
static

Definition at line 33 of file commands.c.

Referenced by cmd_queue_alloc(), and cmd_queue_free().

◆ cmd_queue_pages_tail

struct cmd_queue_page* cmd_queue_pages_tail
static

Definition at line 34 of file commands.c.

Referenced by cmd_queue_alloc(), and cmd_queue_free().

◆ jtag_command_queue

struct jtag_command* jtag_command_queue
static

Definition at line 36 of file commands.c.

Referenced by jtag_command_queue_get(), and jtag_command_queue_reset().

◆ next_command_pointer

struct jtag_command** next_command_pointer = &jtag_command_queue
static

Definition at line 37 of file commands.c.

Referenced by jtag_command_queue_reset(), and jtag_queue_command().