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;
}
{
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;
}
* 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);
}
}
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;
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;