diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-08-25 16:16:00 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-08-25 16:16:00 +0000 |
commit | 34d3bfbcf2c29b07da3ca371284986e4457381eb (patch) | |
tree | 4c45e6dca1eac22524fbda4c48108f2216cf19d8 | |
parent | 52c0037c4f0a93ec87fe6e46ef776580090db624 (diff) | |
download | openocd+libswd-34d3bfbcf2c29b07da3ca371284986e4457381eb.tar.gz openocd+libswd-34d3bfbcf2c29b07da3ca371284986e4457381eb.tar.bz2 openocd+libswd-34d3bfbcf2c29b07da3ca371284986e4457381eb.tar.xz openocd+libswd-34d3bfbcf2c29b07da3ca371284986e4457381eb.zip |
RCLK is not supported, return error instead of crashing.
git-svn-id: svn://svn.berlios.de/openocd/trunk@968 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r-- | src/jtag/ft2232.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/jtag/ft2232.c b/src/jtag/ft2232.c index 3cc552d7..f0047d31 100644 --- a/src/jtag/ft2232.c +++ b/src/jtag/ft2232.c @@ -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 |