summaryrefslogtreecommitdiff
path: root/src/jtag/amt_jtagaccel.c
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-09 21:21:06 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-09 21:39:28 -0800
commit8d6dcb9d39f0f948ef44beff991337b830fc4567 (patch)
treea0219bfc5172ec97a24ab8a8acfa01c7e6c8c70a /src/jtag/amt_jtagaccel.c
parentef6387a0c90913b888aea33ac7a275a246e3e8e3 (diff)
downloadopenocd+libswd-8d6dcb9d39f0f948ef44beff991337b830fc4567.tar.gz
openocd+libswd-8d6dcb9d39f0f948ef44beff991337b830fc4567.tar.bz2
openocd+libswd-8d6dcb9d39f0f948ef44beff991337b830fc4567.tar.xz
openocd+libswd-8d6dcb9d39f0f948ef44beff991337b830fc4567.zip
jtag: remove useless declarations
Contrary to my previous assessment, some opportunities to remove forward declarations were overlooked. Remove them by moving the definitions of the command registration and interface structure to the end of files.
Diffstat (limited to 'src/jtag/amt_jtagaccel.c')
-rw-r--r--src/jtag/amt_jtagaccel.c52
1 files changed, 21 insertions, 31 deletions
diff --git a/src/jtag/amt_jtagaccel.c b/src/jtag/amt_jtagaccel.c
index e3f440cc..abfaadc9 100644
--- a/src/jtag/amt_jtagaccel.c
+++ b/src/jtag/amt_jtagaccel.c
@@ -72,15 +72,6 @@ static int data_mode = IEEE1284_MODE_EPP | IEEE1284_DATA ;
#endif // PARPORT_USE_PPDEV
-static int amt_jtagaccel_execute_queue(void);
-static int amt_jtagaccel_register_commands(struct command_context_s *cmd_ctx);
-static int amt_jtagaccel_speed(int speed);
-static int amt_jtagaccel_init(void);
-static int amt_jtagaccel_quit(void);
-
-static int amt_jtagaccel_handle_parport_port_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-static int amt_jtagaccel_handle_rtck_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-
/* tap_move[i][j]: tap movement command to go from state i to state j
* 0: Test-Logic-Reset
* 1: Run-Test/Idle
@@ -101,28 +92,6 @@ static uint8_t amt_jtagaccel_tap_move[6][6][2] =
};
-jtag_interface_t amt_jtagaccel_interface =
-{
- .name = "amt_jtagaccel",
-
- .execute_queue = amt_jtagaccel_execute_queue,
-
- .speed = amt_jtagaccel_speed,
- .register_commands = amt_jtagaccel_register_commands,
- .init = amt_jtagaccel_init,
- .quit = amt_jtagaccel_quit,
-};
-
-static int amt_jtagaccel_register_commands(struct command_context_s *cmd_ctx)
-{
- register_command(cmd_ctx, NULL, "parport_port", amt_jtagaccel_handle_parport_port_command,
- COMMAND_CONFIG, NULL);
- register_command(cmd_ctx, NULL, "rtck", amt_jtagaccel_handle_rtck_command,
- COMMAND_CONFIG, NULL);
-
- return ERROR_OK;
-}
-
static void amt_jtagaccel_reset(int trst, int srst)
{
if (trst == 1)
@@ -571,3 +540,24 @@ static int amt_jtagaccel_handle_rtck_command(struct command_context_s *cmd_ctx,
return ERROR_OK;
}
+
+static int amt_jtagaccel_register_commands(struct command_context_s *cmd_ctx)
+{
+ register_command(cmd_ctx, NULL, "parport_port",
+ amt_jtagaccel_handle_parport_port_command, COMMAND_CONFIG,
+ NULL);
+ register_command(cmd_ctx, NULL, "rtck",
+ amt_jtagaccel_handle_rtck_command, COMMAND_CONFIG,
+ NULL);
+
+ return ERROR_OK;
+}
+
+jtag_interface_t amt_jtagaccel_interface = {
+ .name = "amt_jtagaccel",
+ .register_commands = &amt_jtagaccel_register_commands,
+ .init = &amt_jtagaccel_init,
+ .quit = &amt_jtagaccel_quit,
+ .speed = &amt_jtagaccel_speed,
+ .execute_queue = &amt_jtagaccel_execute_queue,
+ };