diff options
-rw-r--r-- | src/jtag/ft2232.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/jtag/ft2232.c b/src/jtag/ft2232.c index e3d92dce..3cc552d7 100644 --- a/src/jtag/ft2232.c +++ b/src/jtag/ft2232.c @@ -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; } |