diff --git a/README.md b/README.md index 3a110f8..394dedc 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,9 @@ Current support: * Digilent arty Artix xc7a35ti (memory and spi flash) * Lattice MachXO3LF Starter Kit LCMX03LF-6900C (flash) +Supported cables: +* JTAG-HS3: jtag programmer cable from digilent + ## compile and install This application uses **libftdi1**, so this library must be installed (and, diff --git a/cable.hpp b/cable.hpp index bd4e549..39261d6 100644 --- a/cable.hpp +++ b/cable.hpp @@ -7,6 +7,7 @@ static std::map cable_list = { {"digilent", {0x0403, 0x6010, 0xe8, 0xeb, 0x00, 0x60}}, + {"digilent_hs3", {0x0403, 0x6014, 0x88, 0x8B, 0x20, 0x30}}, {"ft2232", {0x0403, 0x6010, 0x08, 0x0B, 0x08, 0x0B}}, {"altera", {0xcafe, 0xbebe, 0x08, 0x0B, 0x08, 0x0B}} }; diff --git a/ftdijtag.cpp b/ftdijtag.cpp index d69861a..5298c7a 100644 --- a/ftdijtag.cpp +++ b/ftdijtag.cpp @@ -204,8 +204,8 @@ int FtdiJtag::read_write(unsigned char *tdi, unsigned char *tdo, int len, char l unsigned char tx_buf[3] = {(unsigned char)(MPSSE_LSB | MPSSE_WRITE_NEG | ((tdi) ? MPSSE_DO_WRITE : 0) | ((tdo) ? (MPSSE_DO_READ | MPSSE_READ_NEG) : 0)), - ((xfer - 1) & 0xff), // low - (((xfer - 1) >> 8) & 0xff)}; // high + static_cast((xfer - 1) & 0xff), // low + static_cast((((xfer - 1) >> 8) & 0xff))}; // high flushTMS(true);