]> git.sur5r.net Git - openocd/commitdiff
RCLK is not supported, return error instead of crashing.
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 25 Aug 2008 16:16:00 +0000 (16:16 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 25 Aug 2008 16:16:00 +0000 (16:16 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@968 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/ft2232.c

index 3cc552d7797bbe17bddcef54128e134c14371a97..f0047d3193569c8a53a404fe739947d59cade635 100644 (file)
@@ -273,6 +273,11 @@ int ft2232_speed_div(int speed, int *khz)
 
 int ft2232_khz(int khz, int *jtag_speed)
 {
+       if (khz==0)
+       {
+               LOG_ERROR("RCLK not supported");
+               return ERROR_FAIL;
+       }
        /* Take a look in the FT2232 manual, 
         * AN2232C-01 Command Processor for
         * MPSSE and MCU Host Bus. Chapter 3.8