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

Go to the source code of this file.

Macros

#define SRST_BIT   32
 
#define TCK_BIT   4
 
#define TDI_BIT   2
 
#define TDO_BIT   1
 
#define TMS_BIT   8
 
#define TRST_BIT   16
 
#define VCC_BIT   64
 

Functions

static int ep93xx_init (void)
 
static int ep93xx_quit (void)
 
static bb_value_t ep93xx_read (void)
 
static int ep93xx_reset (int trst, int srst)
 
static int ep93xx_write (int tck, int tms, int tdi)
 
static int set_gonk_mode (void)
 

Variables

static int dev_mem_fd
 
struct adapter_driver ep93xx_adapter_driver
 
static struct bitbang_interface ep93xx_bitbang
 
static struct jtag_interface ep93xx_interface
 
static struct timespec ep93xx_zzzz
 
static uint8_t * gpio_controller
 
static volatile uint8_t * gpio_data_direction_register
 
static volatile uint8_t * gpio_data_register
 
static uint8_t output_value
 

Macro Definition Documentation

◆ SRST_BIT

#define SRST_BIT   32

Definition at line 20 of file ep93xx.c.

◆ TCK_BIT

#define TCK_BIT   4

Definition at line 17 of file ep93xx.c.

◆ TDI_BIT

#define TDI_BIT   2

Definition at line 16 of file ep93xx.c.

◆ TDO_BIT

#define TDO_BIT   1

Definition at line 15 of file ep93xx.c.

◆ TMS_BIT

#define TMS_BIT   8

Definition at line 18 of file ep93xx.c.

◆ TRST_BIT

#define TRST_BIT   16

Definition at line 19 of file ep93xx.c.

◆ VCC_BIT

#define VCC_BIT   64

Definition at line 21 of file ep93xx.c.

Function Documentation

◆ ep93xx_init()

◆ ep93xx_quit()

static int ep93xx_quit ( void  )
static

Definition at line 203 of file ep93xx.c.

References ERROR_OK.

◆ ep93xx_read()

static bb_value_t ep93xx_read ( void  )
static

Definition at line 64 of file ep93xx.c.

References BB_HIGH, BB_LOW, gpio_data_register, and TDO_BIT.

◆ ep93xx_reset()

static int ep93xx_reset ( int  trst,
int  srst 
)
static

Definition at line 93 of file ep93xx.c.

References ep93xx_zzzz, ERROR_OK, gpio_data_register, NULL, output_value, SRST_BIT, and TRST_BIT.

◆ ep93xx_write()

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

Definition at line 69 of file ep93xx.c.

References ep93xx_zzzz, ERROR_OK, gpio_data_register, NULL, output_value, TCK_BIT, TDI_BIT, and TMS_BIT.

◆ set_gonk_mode()

static int set_gonk_mode ( void  )
static

Definition at line 111 of file ep93xx.c.

References dev_mem_fd, ERROR_JTAG_INIT_FAILED, ERROR_OK, LOG_ERROR, and NULL.

Referenced by ep93xx_init().

Variable Documentation

◆ dev_mem_fd

int dev_mem_fd
static

Definition at line 26 of file ep93xx.c.

Referenced by ep93xx_init(), and set_gonk_mode().

◆ ep93xx_adapter_driver

struct adapter_driver ep93xx_adapter_driver
Initial value:
= {
.name = "ep93xx",
.transports = jtag_only,
.init = ep93xx_init,
.quit = ep93xx_quit,
.reset = ep93xx_reset,
.jtag_ops = &ep93xx_interface,
}
const char *const jtag_only[]
Definition: adapter.c:27
static int ep93xx_quit(void)
Definition: ep93xx.c:203
static struct jtag_interface ep93xx_interface
Definition: ep93xx.c:42
static int ep93xx_reset(int trst, int srst)
Definition: ep93xx.c:93
static int ep93xx_init(void)
Definition: ep93xx.c:129

Definition at line 38 of file ep93xx.c.

◆ ep93xx_bitbang

struct bitbang_interface ep93xx_bitbang
static
Initial value:
= {
.read = ep93xx_read,
.write = ep93xx_write,
.blink = NULL,
}
static bb_value_t ep93xx_read(void)
Definition: ep93xx.c:64
static int ep93xx_write(int tck, int tms, int tdi)
Definition: ep93xx.c:69
#define NULL
Definition: usb.h:16

Definition at line 38 of file ep93xx.c.

Referenced by ep93xx_init().

◆ ep93xx_interface

struct jtag_interface ep93xx_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 38 of file ep93xx.c.

◆ ep93xx_zzzz

struct timespec ep93xx_zzzz
static

Definition at line 38 of file ep93xx.c.

Referenced by ep93xx_init(), ep93xx_reset(), and ep93xx_write().

◆ gpio_controller

uint8_t* gpio_controller
static

Definition at line 27 of file ep93xx.c.

Referenced by ep93xx_init().

◆ gpio_data_direction_register

volatile uint8_t* gpio_data_direction_register
static

Definition at line 29 of file ep93xx.c.

Referenced by ep93xx_init().

◆ gpio_data_register

volatile uint8_t* gpio_data_register
static

Definition at line 28 of file ep93xx.c.

Referenced by ep93xx_init(), ep93xx_read(), ep93xx_reset(), and ep93xx_write().

◆ output_value

uint8_t output_value
static

Definition at line 25 of file ep93xx.c.

Referenced by ep93xx_init(), ep93xx_reset(), ep93xx_write(), and usbprog_write().