Line 2... |
Line 2... |
#ifndef _CABLE_COMMON_H_
|
#ifndef _CABLE_COMMON_H_
|
#define _CABLE_COMMON_H_
|
#define _CABLE_COMMON_H_
|
|
|
#include <stdint.h>
|
#include <stdint.h>
|
|
|
|
|
|
typedef struct {
|
|
const char *name;
|
|
int (*inout_func)(uint8_t, uint8_t *);
|
|
int (*out_func)(uint8_t);
|
|
int (*init_func)();
|
|
int (*opt_func)(int, char *);
|
|
int (*bit_out_func)(uint8_t);
|
|
int (*bit_inout_func)(uint8_t, uint8_t *);
|
|
int (*stream_out_func)(uint32_t *, int, int);
|
|
int (*stream_inout_func)(uint32_t *, uint32_t *, int, int);
|
|
int (*flush_func)();
|
|
const char *opts;
|
|
const char *help;
|
|
} jtag_cable_t;
|
|
|
// Defines to use in the 'packet' args of cable_write_bit()
|
// Defines to use in the 'packet' args of cable_write_bit()
|
// and cable_read_write_bit(). Note that while TRST is
|
// and cable_read_write_bit(). Note that while TRST is
|
// active low for JTAG hardware, here the TRST bit
|
// active low for JTAG hardware, here the TRST bit
|
// should be set when you want the TRST wire active
|
// should be set when you want the TRST wire active
|
// (JTAG TAP to be reset).
|
// (JTAG TAP to be reset).
|
Line 19... |
Line 35... |
#define TDI_BIT (0x04)
|
#define TDI_BIT (0x04)
|
#define TMS_BIT (0x08)
|
#define TMS_BIT (0x08)
|
#define TDO_BIT (0x20)
|
#define TDO_BIT (0x20)
|
|
|
// Cable subsystem / init routines
|
// Cable subsystem / init routines
|
|
void cable_setup(void);
|
int cable_select(const char *cable);
|
int cable_select(const char *cable);
|
int cable_init();
|
int cable_init();
|
int cable_parse_opt(int c, char *str);
|
int cable_parse_opt(int c, char *str);
|
const char *cable_get_args();
|
const char *cable_get_args();
|
void cable_print_help();
|
void cable_print_help();
|