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

Go to the source code of this file.

Functions

static int dummy_init (void)
 
static int dummy_khz (int khz, int *jtag_speed)
 
static int dummy_led (int on)
 
static int dummy_quit (void)
 
static bb_value_t dummy_read (void)
 
static int dummy_reset (int trst, int srst)
 
static int dummy_speed (int speed)
 
static int dummy_speed_div (int speed, int *khz)
 
static int dummy_write (int tck, int tms, int tdi)
 

Variables

static int clock_count
 
struct adapter_driver dummy_adapter_driver
 
static struct bitbang_interface dummy_bitbang
 
static int dummy_clock
 
static const struct command_registration dummy_command_handlers []
 
static uint32_t dummy_data
 
static struct jtag_interface dummy_interface
 
static tap_state_t dummy_state = TAP_RESET
 

Function Documentation

◆ dummy_init()

static int dummy_init ( void  )
static

Definition at line 110 of file dummy.c.

References dummy_bitbang, and ERROR_OK.

◆ dummy_khz()

static int dummy_khz ( int  khz,
int *  jtag_speed 
)
static

Definition at line 86 of file dummy.c.

References ERROR_OK.

◆ dummy_led()

static int dummy_led ( int  on)
static

Definition at line 75 of file dummy.c.

◆ dummy_quit()

static int dummy_quit ( void  )
static

Definition at line 117 of file dummy.c.

◆ dummy_read()

static bb_value_t dummy_read ( void  )
static

Definition at line 25 of file dummy.c.

References BB_HIGH, BB_LOW, and dummy_data.

◆ dummy_reset()

static int dummy_reset ( int  trst,
int  srst 
)
static

◆ dummy_speed()

static int dummy_speed ( int  speed)
static

Definition at line 105 of file dummy.c.

References ERROR_OK.

◆ dummy_speed_div()

static int dummy_speed_div ( int  speed,
int *  khz 
)
static

Definition at line 95 of file dummy.c.

References ERROR_OK.

◆ dummy_write()

static int dummy_write ( int  tck,
int  tms,
int  tdi 
)
static

Variable Documentation

◆ clock_count

int clock_count
static

Definition at line 21 of file dummy.c.

Referenced by COMMAND_HANDLER(), and dummy_write().

◆ dummy_adapter_driver

struct adapter_driver dummy_adapter_driver
Initial value:
= {
.name = "dummy",
.transports = jtag_only,
.init = &dummy_init,
.quit = &dummy_quit,
.reset = &dummy_reset,
.speed = &dummy_speed,
.khz = &dummy_khz,
.speed_div = &dummy_speed_div,
.jtag_ops = &dummy_interface,
}
const char *const jtag_only[]
Definition: adapter.c:27
static struct jtag_interface dummy_interface
Definition: dummy.c:136
static int dummy_init(void)
Definition: dummy.c:110
static int dummy_speed_div(int speed, int *khz)
Definition: dummy.c:95
static int dummy_speed(int speed)
Definition: dummy.c:105
static const struct command_registration dummy_command_handlers[]
Definition: dummy.c:122
static int dummy_reset(int trst, int srst)
Definition: dummy.c:64
static int dummy_quit(void)
Definition: dummy.c:117
static int dummy_khz(int khz, int *jtag_speed)
Definition: dummy.c:86

Definition at line 117 of file dummy.c.

◆ dummy_bitbang

struct bitbang_interface dummy_bitbang
static
Initial value:
= {
.read = &dummy_read,
.write = &dummy_write,
.blink = &dummy_led,
}
static int dummy_write(int tck, int tms, int tdi)
Definition: dummy.c:32
static bb_value_t dummy_read(void)
Definition: dummy.c:25
static int dummy_led(int on)
Definition: dummy.c:75

Definition at line 75 of file dummy.c.

Referenced by dummy_init().

◆ dummy_clock

int dummy_clock
static

Definition at line 19 of file dummy.c.

Referenced by dummy_reset(), and dummy_write().

◆ dummy_command_handlers

const struct command_registration dummy_command_handlers[]
static
Initial value:
= {
{
.name = "dummy",
.mode = COMMAND_ANY,
.help = "dummy interface driver commands",
.usage = "",
},
}
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
Definition: command.h:253
@ COMMAND_ANY
Definition: command.h:42
const struct command_registration hello_command_handlers[]
Export the registration for the hello command group, so it can be embedded in example drivers.
Definition: hello.c:86
const char * usage
a string listing the options and arguments, required or optional
Definition: command.h:241

Definition at line 117 of file dummy.c.

◆ dummy_data

uint32_t dummy_data
static

Definition at line 23 of file dummy.c.

Referenced by dummy_read(), and dummy_write().

◆ dummy_interface

struct jtag_interface dummy_interface
static
Initial value:
= {
.supported = DEBUG_CAP_TMS_SEQ,
.execute_queue = &bitbang_execute_queue,
}
int bitbang_execute_queue(struct jtag_command *cmd_queue)
Definition: bitbang.c:293
#define DEBUG_CAP_TMS_SEQ
Definition: interface.h:187

Definition at line 117 of file dummy.c.

◆ dummy_state

tap_state_t dummy_state = TAP_RESET
static

Definition at line 17 of file dummy.c.

Referenced by dummy_reset(), and dummy_write().