From: Zachary T Welch Date: Fri, 13 Nov 2009 12:14:50 +0000 (-0800) Subject: jtag_interface_t -> struct jtag_interface X-Git-Tag: v0.4.0-rc1~786 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9f535f9af7c6b7e8843033049a6da0f6d76d513b;p=openocd jtag_interface_t -> struct jtag_interface Remove useless typedef and redundant suffix from struct jtag_interface. --- diff --git a/src/jtag/amt_jtagaccel.c b/src/jtag/amt_jtagaccel.c index a34387f8..306216ad 100644 --- a/src/jtag/amt_jtagaccel.c +++ b/src/jtag/amt_jtagaccel.c @@ -552,7 +552,7 @@ static int amt_jtagaccel_register_commands(struct command_context_s *cmd_ctx) return ERROR_OK; } -jtag_interface_t amt_jtagaccel_interface = { +struct jtag_interface amt_jtagaccel_interface = { .name = "amt_jtagaccel", .register_commands = &amt_jtagaccel_register_commands, .init = &amt_jtagaccel_init, diff --git a/src/jtag/arm-jtag-ew.c b/src/jtag/arm-jtag-ew.c index fa18ef0f..e3372606 100644 --- a/src/jtag/arm-jtag-ew.c +++ b/src/jtag/arm-jtag-ew.c @@ -109,7 +109,7 @@ static armjtagew_jtag_t* armjtagew_jtag_handle; /***************************************************************************/ /* External interface implementation */ -jtag_interface_t armjtagew_interface = +struct jtag_interface armjtagew_interface = { .name = "arm-jtag-ew", .execute_queue = armjtagew_execute_queue, diff --git a/src/jtag/at91rm9200.c b/src/jtag/at91rm9200.c index 52869a3e..70625753 100644 --- a/src/jtag/at91rm9200.c +++ b/src/jtag/at91rm9200.c @@ -122,7 +122,7 @@ static int at91rm9200_register_commands(struct command_context_s *cmd_ctx); static int at91rm9200_init(void); static int at91rm9200_quit(void); -jtag_interface_t at91rm9200_interface = +struct jtag_interface at91rm9200_interface = { .name = "at91rm9200", diff --git a/src/jtag/core.c b/src/jtag/core.c index 48af0406..3684e06c 100644 --- a/src/jtag/core.c +++ b/src/jtag/core.c @@ -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 int jtag_speed = 0; -static struct jtag_interface_s *jtag = NULL; +static struct jtag_interface *jtag = NULL; /* configuration */ -jtag_interface_t *jtag_interface = NULL; +struct jtag_interface *jtag_interface = NULL; void jtag_set_error(int error) { diff --git a/src/jtag/dummy.c b/src/jtag/dummy.c index 5fc9251f..ce3cca35 100644 --- a/src/jtag/dummy.c +++ b/src/jtag/dummy.c @@ -46,7 +46,7 @@ static int dummy_speed_div(int speed, int *khz); /* The dummy driver is used to easily check the code path * where the target is unresponsive. */ -jtag_interface_t dummy_interface = +struct jtag_interface dummy_interface = { .name = "dummy", diff --git a/src/jtag/ep93xx.c b/src/jtag/ep93xx.c index 50e2ad3f..6ae823e8 100644 --- a/src/jtag/ep93xx.c +++ b/src/jtag/ep93xx.c @@ -53,7 +53,7 @@ static int ep93xx_quit(void); struct timespec ep93xx_zzzz; -jtag_interface_t ep93xx_interface = +struct jtag_interface ep93xx_interface = { .name = "ep93xx", diff --git a/src/jtag/ft2232.c b/src/jtag/ft2232.c index 39036bcb..6f8dd0d4 100644 --- a/src/jtag/ft2232.c +++ b/src/jtag/ft2232.c @@ -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", .register_commands = &ft2232_register_commands, .init = &ft2232_init, diff --git a/src/jtag/gw16012.c b/src/jtag/gw16012.c index 07188f4e..dfc07be2 100644 --- a/src/jtag/gw16012.c +++ b/src/jtag/gw16012.c @@ -571,7 +571,7 @@ static int gw16012_register_commands(struct command_context_s *cmd_ctx) return ERROR_OK; } -jtag_interface_t gw16012_interface = { +struct jtag_interface gw16012_interface = { .name = "gw16012", .register_commands = &gw16012_register_commands, .init = &gw16012_init, diff --git a/src/jtag/interface.h b/src/jtag/interface.h index afe21086..57272985 100644 --- a/src/jtag/interface.h +++ b/src/jtag/interface.h @@ -184,8 +184,7 @@ static inline tap_state_t jtag_debug_state_machine(const void *tms_buf, } #endif // _DEBUG_JTAG_IO_ -typedef struct jtag_interface_s -{ +struct jtag_interface { /// The name of the JTAG interface driver. char* name; @@ -271,7 +270,7 @@ typedef struct jtag_interface_s * @returns ERROR_OK on success, or an error code on failure. */ int (*srst_asserted)(int* srst_asserted); -} jtag_interface_t; +}; #endif // OPENOCD_JTAG_INTERFACE_H diff --git a/src/jtag/interfaces.c b/src/jtag/interfaces.c index 778c4e3f..643e1118 100644 --- a/src/jtag/interfaces.c +++ b/src/jtag/interfaces.c @@ -42,51 +42,51 @@ */ #if BUILD_ZY1000 == 1 -extern jtag_interface_t zy1000_interface; +extern struct jtag_interface zy1000_interface; #elif defined(BUILD_MINIDRIVER_DUMMY) -extern jtag_interface_t minidummy_interface; +extern struct jtag_interface minidummy_interface; #else // standard drivers #if BUILD_PARPORT == 1 -extern jtag_interface_t parport_interface; +extern struct jtag_interface parport_interface; #endif #if BUILD_DUMMY == 1 -extern jtag_interface_t dummy_interface; +extern struct jtag_interface dummy_interface; #endif #if BUILD_FT2232_FTD2XX == 1 -extern jtag_interface_t ft2232_interface; +extern struct jtag_interface ft2232_interface; #endif #if BUILD_FT2232_LIBFTDI == 1 -extern jtag_interface_t ft2232_interface; +extern struct jtag_interface ft2232_interface; #endif #if BUILD_AMTJTAGACCEL == 1 -extern jtag_interface_t amt_jtagaccel_interface; +extern struct jtag_interface amt_jtagaccel_interface; #endif #if BUILD_EP93XX == 1 -extern jtag_interface_t ep93xx_interface; +extern struct jtag_interface ep93xx_interface; #endif #if BUILD_AT91RM9200 == 1 -extern jtag_interface_t at91rm9200_interface; +extern struct jtag_interface at91rm9200_interface; #endif #if BUILD_GW16012 == 1 -extern jtag_interface_t gw16012_interface; +extern struct jtag_interface gw16012_interface; #endif #if BUILD_PRESTO_LIBFTDI == 1 || BUILD_PRESTO_FTD2XX == 1 -extern jtag_interface_t presto_interface; +extern struct jtag_interface presto_interface; #endif #if BUILD_USBPROG == 1 -extern jtag_interface_t usbprog_interface; +extern struct jtag_interface usbprog_interface; #endif #if BUILD_JLINK == 1 -extern jtag_interface_t jlink_interface; +extern struct jtag_interface jlink_interface; #endif #if BUILD_VSLLINK == 1 -extern jtag_interface_t vsllink_interface; +extern struct jtag_interface vsllink_interface; #endif #if BUILD_RLINK == 1 -extern jtag_interface_t rlink_interface; +extern struct jtag_interface rlink_interface; #endif #if BUILD_ARMJTAGEW == 1 -extern jtag_interface_t armjtagew_interface; +extern struct jtag_interface armjtagew_interface; #endif #endif // standard drivers @@ -97,7 +97,7 @@ extern jtag_interface_t armjtagew_interface; * The list should be defined to contain either one minidriver interface * or some number of standard driver interfaces, never both. */ -jtag_interface_t *jtag_interfaces[] = { +struct jtag_interface *jtag_interfaces[] = { #if BUILD_ZY1000 == 1 &zy1000_interface, #elif defined(BUILD_MINIDRIVER_DUMMY) diff --git a/src/jtag/interfaces.h b/src/jtag/interfaces.h index a32d3f91..38f1e714 100644 --- a/src/jtag/interfaces.h +++ b/src/jtag/interfaces.h @@ -40,6 +40,6 @@ /// Dynamically load all JTAG interface modules from specified directory. 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 diff --git a/src/jtag/jlink.c b/src/jtag/jlink.c index 5cf944c7..8d9aa8f0 100644 --- a/src/jtag/jlink.c +++ b/src/jtag/jlink.c @@ -139,7 +139,7 @@ static jlink_jtag_t* jlink_jtag_handle; /***************************************************************************/ /* External interface implementation */ -jtag_interface_t jlink_interface = +struct jtag_interface jlink_interface = { .name = "jlink", .execute_queue = jlink_execute_queue, diff --git a/src/jtag/minidummy/minidummy.c b/src/jtag/minidummy/minidummy.c index af98ec5f..b01f593b 100644 --- a/src/jtag/minidummy/minidummy.c +++ b/src/jtag/minidummy/minidummy.c @@ -27,7 +27,7 @@ -jtag_interface_t minidummy_interface = +struct jtag_interface minidummy_interface = { .name = "minidummy", .execute_queue = NULL, diff --git a/src/jtag/parport.c b/src/jtag/parport.c index 8906970d..d4d9b22d 100644 --- a/src/jtag/parport.c +++ b/src/jtag/parport.c @@ -510,7 +510,7 @@ static int parport_register_commands(struct command_context_s *cmd_ctx) return ERROR_OK; } -jtag_interface_t parport_interface = { +struct jtag_interface parport_interface = { .name = "parport", .register_commands = parport_register_commands, .init = parport_init, diff --git a/src/jtag/presto.c b/src/jtag/presto.c index b8703770..29066b18 100644 --- a/src/jtag/presto.c +++ b/src/jtag/presto.c @@ -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_quit(void); -jtag_interface_t presto_interface = +struct jtag_interface presto_interface = { .name = "presto", .execute_queue = bitq_execute_queue, diff --git a/src/jtag/rlink/rlink.c b/src/jtag/rlink/rlink.c index 3c85789f..db91698e 100644 --- a/src/jtag/rlink/rlink.c +++ b/src/jtag/rlink/rlink.c @@ -1878,7 +1878,7 @@ int rlink_quit(void) } -jtag_interface_t rlink_interface = +struct jtag_interface rlink_interface = { .name = "rlink", .init = rlink_init, diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c index 04b3ed2f..3c9ef0e2 100644 --- a/src/jtag/tcl.c +++ b/src/jtag/tcl.c @@ -49,7 +49,7 @@ static const Jim_Nvp nvp_jtag_tap_event[] = { { .name = NULL, .value = -1 } }; -extern jtag_interface_t *jtag_interface; +extern struct jtag_interface *jtag_interface; enum jtag_tap_cfg_param { JCFG_EVENT diff --git a/src/jtag/usbprog.c b/src/jtag/usbprog.c index 6c416644..06a9673f 100644 --- a/src/jtag/usbprog.c +++ b/src/jtag/usbprog.c @@ -61,7 +61,7 @@ static void usbprog_path_move(pathmove_command_t *cmd); static void usbprog_runtest(int num_cycles); 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", .execute_queue = usbprog_execute_queue, diff --git a/src/jtag/vsllink.c b/src/jtag/vsllink.c index decca16c..f462f07c 100644 --- a/src/jtag/vsllink.c +++ b/src/jtag/vsllink.c @@ -1907,7 +1907,7 @@ static int vsllink_register_commands(struct command_context_s *cmd_ctx) return ERROR_OK; } -jtag_interface_t vsllink_interface = { +struct jtag_interface vsllink_interface = { .name = "vsllink", .register_commands = &vsllink_register_commands, .init = &vsllink_init, diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c index 1a926ca9..8f4d5e5f 100644 --- a/src/jtag/zy1000/zy1000.c +++ b/src/jtag/zy1000/zy1000.c @@ -110,7 +110,7 @@ static int zy1000_power_dropout(int *dropout) } -jtag_interface_t zy1000_interface = +struct jtag_interface zy1000_interface = { .name = "ZY1000", .execute_queue = NULL,