jtag_interface_t -> struct jtag_interface
Remove useless typedef and redundant suffix from struct jtag_interface.
This commit is contained in:
parent
bee796b5b0
commit
9f535f9af7
|
@ -552,7 +552,7 @@ static int amt_jtagaccel_register_commands(struct command_context_s *cmd_ctx)
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
jtag_interface_t amt_jtagaccel_interface = {
|
struct jtag_interface amt_jtagaccel_interface = {
|
||||||
.name = "amt_jtagaccel",
|
.name = "amt_jtagaccel",
|
||||||
.register_commands = &amt_jtagaccel_register_commands,
|
.register_commands = &amt_jtagaccel_register_commands,
|
||||||
.init = &amt_jtagaccel_init,
|
.init = &amt_jtagaccel_init,
|
||||||
|
|
|
@ -109,7 +109,7 @@ static armjtagew_jtag_t* armjtagew_jtag_handle;
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
/* External interface implementation */
|
/* External interface implementation */
|
||||||
|
|
||||||
jtag_interface_t armjtagew_interface =
|
struct jtag_interface armjtagew_interface =
|
||||||
{
|
{
|
||||||
.name = "arm-jtag-ew",
|
.name = "arm-jtag-ew",
|
||||||
.execute_queue = armjtagew_execute_queue,
|
.execute_queue = armjtagew_execute_queue,
|
||||||
|
|
|
@ -122,7 +122,7 @@ static int at91rm9200_register_commands(struct command_context_s *cmd_ctx);
|
||||||
static int at91rm9200_init(void);
|
static int at91rm9200_init(void);
|
||||||
static int at91rm9200_quit(void);
|
static int at91rm9200_quit(void);
|
||||||
|
|
||||||
jtag_interface_t at91rm9200_interface =
|
struct jtag_interface at91rm9200_interface =
|
||||||
{
|
{
|
||||||
.name = "at91rm9200",
|
.name = "at91rm9200",
|
||||||
|
|
||||||
|
|
|
@ -115,10 +115,10 @@ static int rclk_fallback_speed_khz = 0;
|
||||||
static enum {CLOCK_MODE_SPEED, CLOCK_MODE_KHZ, CLOCK_MODE_RCLK} clock_mode;
|
static enum {CLOCK_MODE_SPEED, CLOCK_MODE_KHZ, CLOCK_MODE_RCLK} clock_mode;
|
||||||
static int jtag_speed = 0;
|
static int jtag_speed = 0;
|
||||||
|
|
||||||
static struct jtag_interface_s *jtag = NULL;
|
static struct jtag_interface *jtag = NULL;
|
||||||
|
|
||||||
/* configuration */
|
/* configuration */
|
||||||
jtag_interface_t *jtag_interface = NULL;
|
struct jtag_interface *jtag_interface = NULL;
|
||||||
|
|
||||||
void jtag_set_error(int error)
|
void jtag_set_error(int error)
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,7 +46,7 @@ static int dummy_speed_div(int speed, int *khz);
|
||||||
/* The dummy driver is used to easily check the code path
|
/* The dummy driver is used to easily check the code path
|
||||||
* where the target is unresponsive.
|
* where the target is unresponsive.
|
||||||
*/
|
*/
|
||||||
jtag_interface_t dummy_interface =
|
struct jtag_interface dummy_interface =
|
||||||
{
|
{
|
||||||
.name = "dummy",
|
.name = "dummy",
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ static int ep93xx_quit(void);
|
||||||
|
|
||||||
struct timespec ep93xx_zzzz;
|
struct timespec ep93xx_zzzz;
|
||||||
|
|
||||||
jtag_interface_t ep93xx_interface =
|
struct jtag_interface ep93xx_interface =
|
||||||
{
|
{
|
||||||
.name = "ep93xx",
|
.name = "ep93xx",
|
||||||
|
|
||||||
|
|
|
@ -3993,7 +3993,7 @@ static int ft2232_register_commands(struct command_context_s* cmd_ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
jtag_interface_t ft2232_interface = {
|
struct jtag_interface ft2232_interface = {
|
||||||
.name = "ft2232",
|
.name = "ft2232",
|
||||||
.register_commands = &ft2232_register_commands,
|
.register_commands = &ft2232_register_commands,
|
||||||
.init = &ft2232_init,
|
.init = &ft2232_init,
|
||||||
|
|
|
@ -571,7 +571,7 @@ static int gw16012_register_commands(struct command_context_s *cmd_ctx)
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
jtag_interface_t gw16012_interface = {
|
struct jtag_interface gw16012_interface = {
|
||||||
.name = "gw16012",
|
.name = "gw16012",
|
||||||
.register_commands = &gw16012_register_commands,
|
.register_commands = &gw16012_register_commands,
|
||||||
.init = &gw16012_init,
|
.init = &gw16012_init,
|
||||||
|
|
|
@ -184,8 +184,7 @@ static inline tap_state_t jtag_debug_state_machine(const void *tms_buf,
|
||||||
}
|
}
|
||||||
#endif // _DEBUG_JTAG_IO_
|
#endif // _DEBUG_JTAG_IO_
|
||||||
|
|
||||||
typedef struct jtag_interface_s
|
struct jtag_interface {
|
||||||
{
|
|
||||||
/// The name of the JTAG interface driver.
|
/// The name of the JTAG interface driver.
|
||||||
char* name;
|
char* name;
|
||||||
|
|
||||||
|
@ -271,7 +270,7 @@ typedef struct jtag_interface_s
|
||||||
* @returns ERROR_OK on success, or an error code on failure.
|
* @returns ERROR_OK on success, or an error code on failure.
|
||||||
*/
|
*/
|
||||||
int (*srst_asserted)(int* srst_asserted);
|
int (*srst_asserted)(int* srst_asserted);
|
||||||
} jtag_interface_t;
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // OPENOCD_JTAG_INTERFACE_H
|
#endif // OPENOCD_JTAG_INTERFACE_H
|
||||||
|
|
|
@ -42,51 +42,51 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if BUILD_ZY1000 == 1
|
#if BUILD_ZY1000 == 1
|
||||||
extern jtag_interface_t zy1000_interface;
|
extern struct jtag_interface zy1000_interface;
|
||||||
#elif defined(BUILD_MINIDRIVER_DUMMY)
|
#elif defined(BUILD_MINIDRIVER_DUMMY)
|
||||||
extern jtag_interface_t minidummy_interface;
|
extern struct jtag_interface minidummy_interface;
|
||||||
#else // standard drivers
|
#else // standard drivers
|
||||||
#if BUILD_PARPORT == 1
|
#if BUILD_PARPORT == 1
|
||||||
extern jtag_interface_t parport_interface;
|
extern struct jtag_interface parport_interface;
|
||||||
#endif
|
#endif
|
||||||
#if BUILD_DUMMY == 1
|
#if BUILD_DUMMY == 1
|
||||||
extern jtag_interface_t dummy_interface;
|
extern struct jtag_interface dummy_interface;
|
||||||
#endif
|
#endif
|
||||||
#if BUILD_FT2232_FTD2XX == 1
|
#if BUILD_FT2232_FTD2XX == 1
|
||||||
extern jtag_interface_t ft2232_interface;
|
extern struct jtag_interface ft2232_interface;
|
||||||
#endif
|
#endif
|
||||||
#if BUILD_FT2232_LIBFTDI == 1
|
#if BUILD_FT2232_LIBFTDI == 1
|
||||||
extern jtag_interface_t ft2232_interface;
|
extern struct jtag_interface ft2232_interface;
|
||||||
#endif
|
#endif
|
||||||
#if BUILD_AMTJTAGACCEL == 1
|
#if BUILD_AMTJTAGACCEL == 1
|
||||||
extern jtag_interface_t amt_jtagaccel_interface;
|
extern struct jtag_interface amt_jtagaccel_interface;
|
||||||
#endif
|
#endif
|
||||||
#if BUILD_EP93XX == 1
|
#if BUILD_EP93XX == 1
|
||||||
extern jtag_interface_t ep93xx_interface;
|
extern struct jtag_interface ep93xx_interface;
|
||||||
#endif
|
#endif
|
||||||
#if BUILD_AT91RM9200 == 1
|
#if BUILD_AT91RM9200 == 1
|
||||||
extern jtag_interface_t at91rm9200_interface;
|
extern struct jtag_interface at91rm9200_interface;
|
||||||
#endif
|
#endif
|
||||||
#if BUILD_GW16012 == 1
|
#if BUILD_GW16012 == 1
|
||||||
extern jtag_interface_t gw16012_interface;
|
extern struct jtag_interface gw16012_interface;
|
||||||
#endif
|
#endif
|
||||||
#if BUILD_PRESTO_LIBFTDI == 1 || BUILD_PRESTO_FTD2XX == 1
|
#if BUILD_PRESTO_LIBFTDI == 1 || BUILD_PRESTO_FTD2XX == 1
|
||||||
extern jtag_interface_t presto_interface;
|
extern struct jtag_interface presto_interface;
|
||||||
#endif
|
#endif
|
||||||
#if BUILD_USBPROG == 1
|
#if BUILD_USBPROG == 1
|
||||||
extern jtag_interface_t usbprog_interface;
|
extern struct jtag_interface usbprog_interface;
|
||||||
#endif
|
#endif
|
||||||
#if BUILD_JLINK == 1
|
#if BUILD_JLINK == 1
|
||||||
extern jtag_interface_t jlink_interface;
|
extern struct jtag_interface jlink_interface;
|
||||||
#endif
|
#endif
|
||||||
#if BUILD_VSLLINK == 1
|
#if BUILD_VSLLINK == 1
|
||||||
extern jtag_interface_t vsllink_interface;
|
extern struct jtag_interface vsllink_interface;
|
||||||
#endif
|
#endif
|
||||||
#if BUILD_RLINK == 1
|
#if BUILD_RLINK == 1
|
||||||
extern jtag_interface_t rlink_interface;
|
extern struct jtag_interface rlink_interface;
|
||||||
#endif
|
#endif
|
||||||
#if BUILD_ARMJTAGEW == 1
|
#if BUILD_ARMJTAGEW == 1
|
||||||
extern jtag_interface_t armjtagew_interface;
|
extern struct jtag_interface armjtagew_interface;
|
||||||
#endif
|
#endif
|
||||||
#endif // standard drivers
|
#endif // standard drivers
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ extern jtag_interface_t armjtagew_interface;
|
||||||
* The list should be defined to contain either one minidriver interface
|
* The list should be defined to contain either one minidriver interface
|
||||||
* or some number of standard driver interfaces, never both.
|
* or some number of standard driver interfaces, never both.
|
||||||
*/
|
*/
|
||||||
jtag_interface_t *jtag_interfaces[] = {
|
struct jtag_interface *jtag_interfaces[] = {
|
||||||
#if BUILD_ZY1000 == 1
|
#if BUILD_ZY1000 == 1
|
||||||
&zy1000_interface,
|
&zy1000_interface,
|
||||||
#elif defined(BUILD_MINIDRIVER_DUMMY)
|
#elif defined(BUILD_MINIDRIVER_DUMMY)
|
||||||
|
|
|
@ -40,6 +40,6 @@
|
||||||
/// Dynamically load all JTAG interface modules from specified directory.
|
/// Dynamically load all JTAG interface modules from specified directory.
|
||||||
void jtag_interface_modules_load(const char *path);
|
void jtag_interface_modules_load(const char *path);
|
||||||
|
|
||||||
extern jtag_interface_t *jtag_interfaces[];
|
extern struct jtag_interface *jtag_interfaces[];
|
||||||
|
|
||||||
#endif // OPENOCD_JTAG_INTERFACES_H
|
#endif // OPENOCD_JTAG_INTERFACES_H
|
||||||
|
|
|
@ -139,7 +139,7 @@ static jlink_jtag_t* jlink_jtag_handle;
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
/* External interface implementation */
|
/* External interface implementation */
|
||||||
|
|
||||||
jtag_interface_t jlink_interface =
|
struct jtag_interface jlink_interface =
|
||||||
{
|
{
|
||||||
.name = "jlink",
|
.name = "jlink",
|
||||||
.execute_queue = jlink_execute_queue,
|
.execute_queue = jlink_execute_queue,
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
jtag_interface_t minidummy_interface =
|
struct jtag_interface minidummy_interface =
|
||||||
{
|
{
|
||||||
.name = "minidummy",
|
.name = "minidummy",
|
||||||
.execute_queue = NULL,
|
.execute_queue = NULL,
|
||||||
|
|
|
@ -510,7 +510,7 @@ static int parport_register_commands(struct command_context_s *cmd_ctx)
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
jtag_interface_t parport_interface = {
|
struct jtag_interface parport_interface = {
|
||||||
.name = "parport",
|
.name = "parport",
|
||||||
.register_commands = parport_register_commands,
|
.register_commands = parport_register_commands,
|
||||||
.init = parport_init,
|
.init = parport_init,
|
||||||
|
|
|
@ -46,7 +46,7 @@ static int presto_jtag_register_commands(struct command_context_s *cmd_ctx);
|
||||||
static int presto_jtag_init(void);
|
static int presto_jtag_init(void);
|
||||||
static int presto_jtag_quit(void);
|
static int presto_jtag_quit(void);
|
||||||
|
|
||||||
jtag_interface_t presto_interface =
|
struct jtag_interface presto_interface =
|
||||||
{
|
{
|
||||||
.name = "presto",
|
.name = "presto",
|
||||||
.execute_queue = bitq_execute_queue,
|
.execute_queue = bitq_execute_queue,
|
||||||
|
|
|
@ -1878,7 +1878,7 @@ int rlink_quit(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
jtag_interface_t rlink_interface =
|
struct jtag_interface rlink_interface =
|
||||||
{
|
{
|
||||||
.name = "rlink",
|
.name = "rlink",
|
||||||
.init = rlink_init,
|
.init = rlink_init,
|
||||||
|
|
|
@ -49,7 +49,7 @@ static const Jim_Nvp nvp_jtag_tap_event[] = {
|
||||||
{ .name = NULL, .value = -1 }
|
{ .name = NULL, .value = -1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
extern jtag_interface_t *jtag_interface;
|
extern struct jtag_interface *jtag_interface;
|
||||||
|
|
||||||
enum jtag_tap_cfg_param {
|
enum jtag_tap_cfg_param {
|
||||||
JCFG_EVENT
|
JCFG_EVENT
|
||||||
|
|
|
@ -61,7 +61,7 @@ static void usbprog_path_move(pathmove_command_t *cmd);
|
||||||
static void usbprog_runtest(int num_cycles);
|
static void usbprog_runtest(int num_cycles);
|
||||||
static void usbprog_scan(bool ir_scan, enum scan_type type, uint8_t *buffer, int scan_size);
|
static void usbprog_scan(bool ir_scan, enum scan_type type, uint8_t *buffer, int scan_size);
|
||||||
|
|
||||||
jtag_interface_t usbprog_interface =
|
struct jtag_interface usbprog_interface =
|
||||||
{
|
{
|
||||||
.name = "usbprog",
|
.name = "usbprog",
|
||||||
.execute_queue = usbprog_execute_queue,
|
.execute_queue = usbprog_execute_queue,
|
||||||
|
|
|
@ -1907,7 +1907,7 @@ static int vsllink_register_commands(struct command_context_s *cmd_ctx)
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
jtag_interface_t vsllink_interface = {
|
struct jtag_interface vsllink_interface = {
|
||||||
.name = "vsllink",
|
.name = "vsllink",
|
||||||
.register_commands = &vsllink_register_commands,
|
.register_commands = &vsllink_register_commands,
|
||||||
.init = &vsllink_init,
|
.init = &vsllink_init,
|
||||||
|
|
|
@ -110,7 +110,7 @@ static int zy1000_power_dropout(int *dropout)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
jtag_interface_t zy1000_interface =
|
struct jtag_interface zy1000_interface =
|
||||||
{
|
{
|
||||||
.name = "ZY1000",
|
.name = "ZY1000",
|
||||||
.execute_queue = NULL,
|
.execute_queue = NULL,
|
||||||
|
|
Loading…
Reference in New Issue