summaryrefslogtreecommitdiff
path: root/src/pld
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-09 23:56:52 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-13 10:51:45 -0800
commitcfc4d5c6b7b6f8f82dc5bbf3ee661c179814666e (patch)
treef129c414d90f81a2caf6054ab7bbcd1306ac1f26 /src/pld
parentddb6138ed428f666064d26bb08036de3afe44bc8 (diff)
downloadopenocd_libswd-cfc4d5c6b7b6f8f82dc5bbf3ee661c179814666e.tar.gz
openocd_libswd-cfc4d5c6b7b6f8f82dc5bbf3ee661c179814666e.tar.bz2
openocd_libswd-cfc4d5c6b7b6f8f82dc5bbf3ee661c179814666e.tar.xz
openocd_libswd-cfc4d5c6b7b6f8f82dc5bbf3ee661c179814666e.zip
use COMMAND_HANDLER macro to define all commands
Diffstat (limited to 'src/pld')
-rw-r--r--src/pld/pld.c9
-rw-r--r--src/pld/virtex2.c3
2 files changed, 4 insertions, 8 deletions
diff --git a/src/pld/pld.c b/src/pld/pld.c
index df7e2fda..c20b936c 100644
--- a/src/pld/pld.c
+++ b/src/pld/pld.c
@@ -57,8 +57,7 @@ pld_device_t *get_pld_device_by_num(int num)
/* pld device <driver> [driver_options ...]
*/
-static int handle_pld_device_command(struct command_context_s *cmd_ctx,
- char *cmd, char **args, int argc)
+COMMAND_HANDLER(handle_pld_device_command)
{
int i;
int found = 0;
@@ -120,8 +119,7 @@ static int handle_pld_device_command(struct command_context_s *cmd_ctx,
return ERROR_OK;
}
-static int handle_pld_devices_command(struct command_context_s *cmd_ctx,
- char *cmd, char **args, int argc)
+COMMAND_HANDLER(handle_pld_devices_command)
{
pld_device_t *p;
int i = 0;
@@ -140,8 +138,7 @@ static int handle_pld_devices_command(struct command_context_s *cmd_ctx,
return ERROR_OK;
}
-static int handle_pld_load_command(struct command_context_s *cmd_ctx,
- char *cmd, char **args, int argc)
+COMMAND_HANDLER(handle_pld_load_command)
{
int retval;
struct timeval start, end, duration;
diff --git a/src/pld/virtex2.c b/src/pld/virtex2.c
index fa646505..3c6d61fe 100644
--- a/src/pld/virtex2.c
+++ b/src/pld/virtex2.c
@@ -177,8 +177,7 @@ static int virtex2_load(struct pld_device_s *pld_device, const char *filename)
return ERROR_OK;
}
-static int virtex2_handle_read_stat_command(struct command_context_s *cmd_ctx,
- char *cmd, char **args, int argc)
+COMMAND_HANDLER(virtex2_handle_read_stat_command)
{
pld_device_t *device;
virtex2_pld_device_t *virtex2_info;