Skip to content
Snippets Groups Projects
Commit 2c75fdf0 authored by mifi's avatar mifi
Browse files

- corrected rounding in ft2232_khz

git-svn-id: svn://svn.berlios.de/openocd/trunk@654 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent e2e874aa
No related branches found
No related tags found
No related merge requests found
......@@ -288,10 +288,11 @@ int ft2232_khz(int khz, int *jtag_speed)
*/
/* Calc speed, (6000 / khz) - 1 */
/* Use 65000 for better rounding */
*jtag_speed = (60000 / khz) - 10;
/* Add 0.5 for rounding */
*jtag_speed += 5;
/* Add 0.9 for rounding */
*jtag_speed += 9;
/* Calc real speed */
*jtag_speed = *jtag_speed / 10;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment