diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-04-30 09:34:31 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-04-30 09:34:31 +0000 |
commit | 95efa83ef5eaf5beace3878a64f66f1faf560cc8 (patch) | |
tree | 826907fc361b9c666a33e785199051b6a4a6e9fc | |
parent | 06cdb3ad449edd73dea6f81183a98ddfa4fbd8eb (diff) |
Edgar's naming convention fixes.
git-svn-id: svn://svn.berlios.de/openocd/trunk@629 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r-- | src/jtag/jtag.c | 17 | ||||
-rw-r--r-- | src/jtag/jtag.h | 2 |
2 files changed, 12 insertions, 7 deletions
diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c index 71e40b24..a2af81eb 100644 --- a/src/jtag/jtag.c +++ b/src/jtag/jtag.c @@ -1622,9 +1622,8 @@ static int default_khz(int khz, int *jtag_speed) return ERROR_FAIL; } -static int default_speedDiv(int speed, int *khz) +static int default_speed_div(int speed, int *khz) { - LOG_ERROR("Translation from jtag_speed to khz not implemented"); return ERROR_FAIL; } @@ -1658,9 +1657,9 @@ int handle_interface_command(struct command_context_s *cmd_ctx, char *cmd, char { jtag_interface->khz = default_khz; } - if (jtag_interface->speedDiv == NULL) + if (jtag_interface->speed_div == NULL) { - jtag_interface->speedDiv = default_speedDiv; + jtag_interface->speed_div = default_speed_div; } return ERROR_OK; } @@ -1859,8 +1858,8 @@ int handle_jtag_speed_command(struct command_context_s *cmd_ctx, char *cmd, char * in which case jtag isn't initialized */ if (jtag) { - jtag->speedDiv(jtag_speed, &speed1); - jtag->speedDiv(jtag_speed_post_reset, &speed2); + jtag->speed_div(jtag_speed, &speed1); + jtag->speed_div(jtag_speed_post_reset, &speed2); jtag->speed(cur_speed); } } @@ -1890,9 +1889,15 @@ int handle_jtag_khz_command(struct command_context_s *cmd_ctx, char *cmd, char * LOG_DEBUG("have interface set up"); int speed_div1, speed_div2; if (jtag->khz(speed1, &speed_div1)!=ERROR_OK) + { + speed1 = speed2 = 0; return ERROR_OK; + } if (jtag->khz(speed2, &speed_div2)!=ERROR_OK) + { + speed1 = speed2 = 0; return ERROR_OK; + } if (argc >= 1) cur_speed = jtag_speed = jtag_speed_post_reset = speed_div1; diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h index f5818b98..bb6818e3 100644 --- a/src/jtag/jtag.h +++ b/src/jtag/jtag.h @@ -200,7 +200,7 @@ typedef struct jtag_interface_s int (*khz)(int khz, int *jtag_speed); /* returns the KHz for the provided JTAG speed. 0=RTCK. The function returns a failure if it can't support the KHz/RTCK. */ - int (*speedDiv)(int speed, int *khz); + int (*speed_div)(int speed, int *khz); } jtag_interface_t; |