]> git.sur5r.net Git - openocd/commitdiff
Edgar's naming convention fixes.
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 30 Apr 2008 09:34:31 +0000 (09:34 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 30 Apr 2008 09:34:31 +0000 (09:34 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@629 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/jtag.c
src/jtag/jtag.h

index 71e40b24b99d234f6daf4b97e843796300d478f7..a2af81eb5a9cbc943c943da4ee72e8887f5b5c14 100644 (file)
@@ -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;
index f5818b988f07e55abc4b0f83b953b51333c749b4..bb6818e36efa14b0ba2a10500271619658a9f5e9 100644 (file)
@@ -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;