]> git.sur5r.net Git - openocd/commitdiff
- added check for max. value of jtag_speed in ft2232_khz.
authormifi <mifi@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 26 May 2008 17:59:26 +0000 (17:59 +0000)
committermifi <mifi@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 26 May 2008 17:59:26 +0000 (17:59 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@690 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/ft2232.c

index e3d92dce6737fdf930ec34aa5976416a94ef8d9d..3cc552d7797bbe17bddcef54128e134c14371a97 100644 (file)
@@ -296,6 +296,12 @@ int ft2232_khz(int khz, int *jtag_speed)
                *jtag_speed = 0;
        }
        
+       /* Check max value */
+       if (*jtag_speed > 0xFFFF)
+       {
+               *jtag_speed = 0xFFFF;
+       }
+       
        return ERROR_OK;
 }