src/xx: cable implementation: rework to use cable_t directly
This commit is contained in:
parent
3e20dc7082
commit
48126cf84c
|
|
@ -29,11 +29,11 @@ using namespace std;
|
|||
#define display(...) do {}while(0)
|
||||
#endif
|
||||
|
||||
CH552_jtag::CH552_jtag(const FTDIpp_MPSSE::mpsse_bit_config &cable,
|
||||
CH552_jtag::CH552_jtag(const cable_t &cable,
|
||||
string dev, const string &serial, uint32_t clkHZ, uint8_t verbose):
|
||||
FTDIpp_MPSSE(cable, dev, serial, clkHZ, verbose), _to_read(0)
|
||||
{
|
||||
init_internal(cable);
|
||||
init_internal(cable.config);
|
||||
}
|
||||
|
||||
CH552_jtag::~CH552_jtag()
|
||||
|
|
@ -59,7 +59,7 @@ CH552_jtag::~CH552_jtag()
|
|||
"Loopback failed, expect problems on later runs %d\n", read);
|
||||
}
|
||||
|
||||
void CH552_jtag::init_internal(const FTDIpp_MPSSE::mpsse_bit_config &cable)
|
||||
void CH552_jtag::init_internal(const mpsse_bit_config &cable)
|
||||
{
|
||||
display("iProduct : %s\n", _iproduct);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cable.hpp"
|
||||
#include "jtagInterface.hpp"
|
||||
#include "ftdipp_mpsse.hpp"
|
||||
|
||||
|
|
@ -22,7 +23,7 @@
|
|||
|
||||
class CH552_jtag : public JtagInterface, private FTDIpp_MPSSE {
|
||||
public:
|
||||
CH552_jtag(const FTDIpp_MPSSE::mpsse_bit_config &cable, std::string dev,
|
||||
CH552_jtag(const cable_t &cable, std::string dev,
|
||||
const std::string &serial, uint32_t clkHZ, uint8_t verbose = false);
|
||||
virtual ~CH552_jtag();
|
||||
|
||||
|
|
@ -48,7 +49,7 @@ class CH552_jtag : public JtagInterface, private FTDIpp_MPSSE {
|
|||
int flush() override;
|
||||
|
||||
private:
|
||||
void init_internal(const FTDIpp_MPSSE::mpsse_bit_config &cable);
|
||||
void init_internal(const mpsse_bit_config &cable);
|
||||
uint32_t _to_read; /*!< amount of byte to read */
|
||||
};
|
||||
#endif // SRC_CH552_JTAG_HPP_
|
||||
|
|
|
|||
|
|
@ -88,8 +88,8 @@ enum cmsisdap_status {
|
|||
DAP_ERROR = 0xff
|
||||
};
|
||||
|
||||
CmsisDAP::CmsisDAP(int vid, int pid, int index, uint8_t verbose):_verbose(verbose),
|
||||
_device_idx(0), _vid(vid), _pid(pid),
|
||||
CmsisDAP::CmsisDAP(const cable_t &cable, int index, uint8_t verbose):_verbose(verbose),
|
||||
_device_idx(0), _vid(cable.vid), _pid(cable.pid),
|
||||
_serial_number(L""), _dev(NULL), _num_tms(0), _is_connect(false)
|
||||
{
|
||||
std::vector<struct hid_device_info *> dev_found;
|
||||
|
|
@ -109,7 +109,7 @@ CmsisDAP::CmsisDAP(int vid, int pid, int index, uint8_t verbose):_verbose(verbos
|
|||
* if vid/pid are 0 this function return all;
|
||||
* if vid/pid are >0 only one (or 0) device returned
|
||||
*/
|
||||
devs = hid_enumerate(vid, pid);
|
||||
devs = hid_enumerate(cable.vid, cable.pid);
|
||||
|
||||
for (cur_dev = devs; NULL != cur_dev; cur_dev = cur_dev->next) {
|
||||
dev_found.push_back(cur_dev);
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cable.hpp"
|
||||
#include "jtagInterface.hpp"
|
||||
|
||||
class CmsisDAP: public JtagInterface {
|
||||
|
|
@ -24,7 +25,7 @@ class CmsisDAP: public JtagInterface {
|
|||
* \param[in] index: interface number
|
||||
* \param[in] verbose: verbose level 0 normal, 1 verbose
|
||||
*/
|
||||
CmsisDAP(const int vid, const int pid, int index, uint8_t verbose);
|
||||
CmsisDAP(const cable_t &cable, int index, uint8_t verbose);
|
||||
|
||||
~CmsisDAP();
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ Efinix::Efinix(Jtag* jtag, const std::string &filename,
|
|||
target_board_t *spi_board = &(board_list[spi_board_name]);
|
||||
|
||||
/* 3: SPI cable */
|
||||
cable_t *spi_cable = &(cable_list[spi_board->cable_name]);
|
||||
cable_t spi_cable = (cable_list[spi_board->cable_name]);
|
||||
|
||||
/* 4: get pinout (cs, oe, rst) */
|
||||
_cs_pin = spi_board->spi_pins_config.cs_pin;
|
||||
|
|
@ -74,7 +74,7 @@ Efinix::Efinix(Jtag* jtag, const std::string &filename,
|
|||
_oe_pin = spi_board->oe_pin;
|
||||
|
||||
/* 5: open SPI interface */
|
||||
_spi = new FtdiSpi(spi_cable->config, spi_board->spi_pins_config,
|
||||
_spi = new FtdiSpi(spi_cable, spi_board->spi_pins_config,
|
||||
jtag->getClkFreq(), verbose > 0);
|
||||
|
||||
/* 6: configure pins direction and default state */
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ using namespace std;
|
|||
#define display(...) do {}while(0)
|
||||
#endif
|
||||
|
||||
FtdiJtagBitBang::FtdiJtagBitBang(const FTDIpp_MPSSE::mpsse_bit_config &cable,
|
||||
FtdiJtagBitBang::FtdiJtagBitBang(const cable_t &cable,
|
||||
const jtag_pins_conf_t *pin_conf, string dev, const std::string &serial,
|
||||
uint32_t clkHZ, uint8_t verbose):
|
||||
FTDIpp_MPSSE(cable, dev, serial, clkHZ, verbose), _bitmode(0),
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
class FtdiJtagBitBang : public JtagInterface, private FTDIpp_MPSSE {
|
||||
public:
|
||||
FtdiJtagBitBang(const FTDIpp_MPSSE::mpsse_bit_config &cable,
|
||||
FtdiJtagBitBang(const cable_t &cable,
|
||||
const jtag_pins_conf_t *pin_conf, std::string dev, const std::string &serial,
|
||||
uint32_t clkHZ, uint8_t verbose = 0);
|
||||
virtual ~FtdiJtagBitBang();
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ using namespace std;
|
|||
#define display(...) do {}while(0)
|
||||
#endif
|
||||
|
||||
FtdiJtagMPSSE::FtdiJtagMPSSE(const FTDIpp_MPSSE::mpsse_bit_config &cable,
|
||||
FtdiJtagMPSSE::FtdiJtagMPSSE(const cable_t &cable,
|
||||
string dev, const string &serial, uint32_t clkHZ,
|
||||
bool invert_read_edge, int8_t verbose):
|
||||
FTDIpp_MPSSE(cable, dev, serial, clkHZ, verbose), _ch552WA(false),
|
||||
|
|
@ -39,7 +39,7 @@ FtdiJtagMPSSE::FtdiJtagMPSSE(const FTDIpp_MPSSE::mpsse_bit_config &cable,
|
|||
_invert_read_edge(invert_read_edge), // false: pos, true: neg
|
||||
_tdo_pos(0)
|
||||
{
|
||||
init_internal(cable);
|
||||
init_internal(cable.config);
|
||||
}
|
||||
|
||||
FtdiJtagMPSSE::~FtdiJtagMPSSE()
|
||||
|
|
@ -65,7 +65,7 @@ FtdiJtagMPSSE::~FtdiJtagMPSSE()
|
|||
"Loopback failed, expect problems on later runs %d\n", read);
|
||||
}
|
||||
|
||||
void FtdiJtagMPSSE::init_internal(const FTDIpp_MPSSE::mpsse_bit_config &cable)
|
||||
void FtdiJtagMPSSE::init_internal(const mpsse_bit_config &cable)
|
||||
{
|
||||
display("iProduct : %s\n", _iproduct);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cable.hpp"
|
||||
#include "jtagInterface.hpp"
|
||||
#include "ftdipp_mpsse.hpp"
|
||||
|
||||
|
|
@ -22,7 +23,7 @@
|
|||
|
||||
class FtdiJtagMPSSE : public JtagInterface, public FTDIpp_MPSSE {
|
||||
public:
|
||||
FtdiJtagMPSSE(const FTDIpp_MPSSE::mpsse_bit_config &cable, std::string dev,
|
||||
FtdiJtagMPSSE(const cable_t &cable, std::string dev,
|
||||
const std::string &serial, uint32_t clkHZ, bool invert_read_edge,
|
||||
int8_t verbose = 0);
|
||||
virtual ~FtdiJtagMPSSE();
|
||||
|
|
@ -59,7 +60,7 @@ class FtdiJtagMPSSE : public JtagInterface, public FTDIpp_MPSSE {
|
|||
int flush() override;
|
||||
|
||||
private:
|
||||
void init_internal(const FTDIpp_MPSSE::mpsse_bit_config &cable);
|
||||
void init_internal(const mpsse_bit_config &cable);
|
||||
/* writeTMSTDI specifics */
|
||||
/*!
|
||||
* \brief try to append tms buffer, flush content if > 6
|
||||
|
|
|
|||
|
|
@ -26,11 +26,11 @@ using namespace std;
|
|||
#define display(...) \
|
||||
do { if (_verbose) fprintf(stdout, __VA_ARGS__);}while(0)
|
||||
|
||||
FTDIpp_MPSSE::FTDIpp_MPSSE(const mpsse_bit_config &cable, const string &dev,
|
||||
FTDIpp_MPSSE::FTDIpp_MPSSE(const cable_t &cable, const string &dev,
|
||||
const std::string &serial, uint32_t clkHZ, int8_t verbose):
|
||||
_verbose(verbose > 2), _cable(cable), _vid(0),
|
||||
_verbose(verbose > 2), _cable(cable.config), _vid(0),
|
||||
_pid(0), _index(0), _bus(-1), _addr(-1),
|
||||
_interface(cable.interface),
|
||||
_interface(cable.config.interface),
|
||||
_clkHZ(clkHZ), _buffer_size(2*32768), _num(0)
|
||||
{
|
||||
libusb_error ret;
|
||||
|
|
@ -45,10 +45,10 @@ FTDIpp_MPSSE::FTDIpp_MPSSE(const mpsse_bit_config &cable, const string &dev,
|
|||
} else {
|
||||
_vid = cable.vid;
|
||||
_pid = cable.pid;
|
||||
if (cable.index == -1)
|
||||
if (cable.config.index == -1)
|
||||
_index = 0;
|
||||
else
|
||||
_index = cable.index;
|
||||
_index = cable.config.index;
|
||||
}
|
||||
|
||||
open_device(serial, 115200);
|
||||
|
|
|
|||
|
|
@ -8,20 +8,11 @@
|
|||
#include <ftdi.h>
|
||||
#include <string>
|
||||
|
||||
#include "cable.hpp"
|
||||
|
||||
class FTDIpp_MPSSE {
|
||||
public:
|
||||
typedef struct {
|
||||
int vid;
|
||||
int pid;
|
||||
int interface;
|
||||
int bit_low_val;
|
||||
int bit_low_dir;
|
||||
int bit_high_val;
|
||||
int bit_high_dir;
|
||||
int index;
|
||||
} mpsse_bit_config;
|
||||
|
||||
FTDIpp_MPSSE(const mpsse_bit_config &cable, const std::string &dev,
|
||||
FTDIpp_MPSSE(const cable_t &cable, const std::string &dev,
|
||||
const std::string &serial, uint32_t clkHZ, int8_t verbose = 0);
|
||||
~FTDIpp_MPSSE();
|
||||
|
||||
|
|
|
|||
|
|
@ -63,12 +63,13 @@ void FtdiSpi::setMode(uint8_t mode)
|
|||
gpio_clear(_clk);
|
||||
}
|
||||
|
||||
static FTDIpp_MPSSE::mpsse_bit_config bit_conf =
|
||||
{0x403, 0x6010, INTERFACE_B, 0x08, 0x0B, 0x08, 0x0B, 0};
|
||||
static cable_t cable = {
|
||||
MODE_FTDI_SERIAL, 0x403, 0x6010, -1, -1, {INTERFACE_B, 0x08, 0x0B, 0x08, 0x0B, 0}
|
||||
};
|
||||
|
||||
FtdiSpi::FtdiSpi(int vid, int pid, unsigned char interface, uint32_t clkHZ,
|
||||
bool verbose):
|
||||
FTDIpp_MPSSE(bit_conf, "", "", clkHZ, verbose)
|
||||
FTDIpp_MPSSE(cable, "", "", clkHZ, verbose)
|
||||
{
|
||||
(void)pid;
|
||||
(void)vid;
|
||||
|
|
@ -80,10 +81,10 @@ FtdiSpi::FtdiSpi(int vid, int pid, unsigned char interface, uint32_t clkHZ,
|
|||
init(1, 0x00, BITMODE_MPSSE);
|
||||
}
|
||||
|
||||
FtdiSpi::FtdiSpi(const FTDIpp_MPSSE::mpsse_bit_config &conf,
|
||||
FtdiSpi::FtdiSpi(const cable_t &cable,
|
||||
spi_pins_conf_t spi_config,
|
||||
uint32_t clkHZ, bool verbose):
|
||||
FTDIpp_MPSSE(conf, "", "", clkHZ, verbose),
|
||||
FTDIpp_MPSSE(cable, "", "", clkHZ, verbose),
|
||||
_cs_bits(1 << 3), _clk(1 << 0), _holdn(0), _wpn(0)
|
||||
{
|
||||
if (spi_config.cs_pin)
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include "board.hpp"
|
||||
#include "cable.hpp"
|
||||
#include "ftdipp_mpsse.hpp"
|
||||
#include "spiInterface.hpp"
|
||||
|
||||
|
|
@ -28,7 +29,7 @@ class FtdiSpi : public FTDIpp_MPSSE, SPIInterface {
|
|||
|
||||
FtdiSpi(int vid, int pid, unsigned char interface, uint32_t clkHZ,
|
||||
bool verbose);
|
||||
FtdiSpi(const FTDIpp_MPSSE::mpsse_bit_config &conf,
|
||||
FtdiSpi(const cable_t &cable,
|
||||
spi_pins_conf_t spi_config, uint32_t clkHZ,
|
||||
bool verbose);
|
||||
~FtdiSpi();
|
||||
|
|
|
|||
22
src/jtag.cpp
22
src/jtag.cpp
|
|
@ -3,22 +3,18 @@
|
|||
* Copyright (C) 2020 Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
|
||||
*/
|
||||
|
||||
#include <libusb.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
|
||||
#include "anlogicCable.hpp"
|
||||
#include "ch552_jtag.hpp"
|
||||
#include "display.hpp"
|
||||
#include "jtag.hpp"
|
||||
#include "ftdipp_mpsse.hpp"
|
||||
#include "ftdiJtagBitbang.hpp"
|
||||
#include "ftdiJtagMPSSE.hpp"
|
||||
#ifdef ENABLE_LIBGPIOD
|
||||
|
|
@ -68,7 +64,7 @@ using namespace std;
|
|||
* - envoyer le dernier avec 0x4B ou 0x6B
|
||||
*/
|
||||
|
||||
Jtag::Jtag(cable_t &cable, const jtag_pins_conf_t *pin_conf, string dev,
|
||||
Jtag::Jtag(const cable_t &cable, const jtag_pins_conf_t *pin_conf, string dev,
|
||||
const string &serial, uint32_t clkHZ, int8_t verbose,
|
||||
const string &ip_adr, int port,
|
||||
const bool invert_read_edge, const string &firmware_path):
|
||||
|
|
@ -88,7 +84,7 @@ Jtag::~Jtag()
|
|||
delete _jtag;
|
||||
}
|
||||
|
||||
void Jtag::init_internal(cable_t &cable, const string &dev, const string &serial,
|
||||
void Jtag::init_internal(const cable_t &cable, const string &dev, const string &serial,
|
||||
const jtag_pins_conf_t *pin_conf, uint32_t clkHZ, const string &firmware_path,
|
||||
const bool invert_read_edge, const string &ip_adr, int port)
|
||||
{
|
||||
|
|
@ -99,14 +95,14 @@ void Jtag::init_internal(cable_t &cable, const string &dev, const string &serial
|
|||
case MODE_FTDI_BITBANG:
|
||||
if (pin_conf == NULL)
|
||||
throw std::exception();
|
||||
_jtag = new FtdiJtagBitBang(cable.config, pin_conf, dev, serial, clkHZ, _verbose);
|
||||
_jtag = new FtdiJtagBitBang(cable, pin_conf, dev, serial, clkHZ, _verbose);
|
||||
break;
|
||||
case MODE_FTDI_SERIAL:
|
||||
_jtag = new FtdiJtagMPSSE(cable.config, dev, serial, clkHZ,
|
||||
_jtag = new FtdiJtagMPSSE(cable, dev, serial, clkHZ,
|
||||
invert_read_edge, _verbose);
|
||||
break;
|
||||
case MODE_CH552_JTAG:
|
||||
_jtag = new CH552_jtag(cable.config, dev, serial, clkHZ, _verbose);
|
||||
_jtag = new CH552_jtag(cable, dev, serial, clkHZ, _verbose);
|
||||
break;
|
||||
case MODE_DIRTYJTAG:
|
||||
_jtag = new DirtyJtag(clkHZ, _verbose);
|
||||
|
|
@ -115,13 +111,11 @@ void Jtag::init_internal(cable_t &cable, const string &dev, const string &serial
|
|||
_jtag = new Jlink(clkHZ, _verbose);
|
||||
break;
|
||||
case MODE_USBBLASTER:
|
||||
_jtag = new UsbBlaster(cable.config.vid, cable.config.pid,
|
||||
firmware_path, _verbose);
|
||||
_jtag = new UsbBlaster(cable, firmware_path, _verbose);
|
||||
break;
|
||||
case MODE_CMSISDAP:
|
||||
#ifdef ENABLE_CMSISDAP
|
||||
_jtag = new CmsisDAP(cable.config.vid, cable.config.pid,
|
||||
cable.config.index, _verbose);
|
||||
_jtag = new CmsisDAP(cable, cable.config.index, _verbose);
|
||||
break;
|
||||
#else
|
||||
std::cerr << "Jtag: support for cmsisdap was not enabled at compile time" << std::endl;
|
||||
|
|
|
|||
|
|
@ -5,19 +5,18 @@
|
|||
|
||||
#ifndef JTAG_H
|
||||
#define JTAG_H
|
||||
#include <ftdi.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "board.hpp"
|
||||
#include "cable.hpp"
|
||||
#include "ftdipp_mpsse.hpp"
|
||||
#include "jtagInterface.hpp"
|
||||
|
||||
class Jtag {
|
||||
public:
|
||||
Jtag(cable_t &cable, const jtag_pins_conf_t *pin_conf, std::string dev,
|
||||
Jtag(const cable_t &cable, const jtag_pins_conf_t *pin_conf, std::string dev,
|
||||
const std::string &serial, uint32_t clkHZ, int8_t verbose,
|
||||
const std::string &ip_adr, int port,
|
||||
const bool invert_read_edge = false,
|
||||
|
|
@ -104,7 +103,7 @@ class Jtag {
|
|||
JtagInterface *_jtag;
|
||||
|
||||
private:
|
||||
void init_internal(cable_t &cable, const std::string &dev,
|
||||
void init_internal(const cable_t &cable, const std::string &dev,
|
||||
const std::string &serial,
|
||||
const jtag_pins_conf_t *pin_conf, uint32_t clkHZ,
|
||||
const std::string &firmware_path,
|
||||
|
|
|
|||
|
|
@ -208,11 +208,11 @@ int main(int argc, char **argv)
|
|||
|
||||
if (args.vid != 0) {
|
||||
printInfo("Cable VID overridden");
|
||||
cable.config.vid = args.vid;
|
||||
cable.vid = args.vid;
|
||||
}
|
||||
if (args.pid != 0) {
|
||||
printInfo("Cable PID overridden");
|
||||
cable.config.pid = args.pid;
|
||||
cable.pid = args.pid;
|
||||
}
|
||||
|
||||
// always set this
|
||||
|
|
@ -230,7 +230,7 @@ int main(int argc, char **argv)
|
|||
pins_config = board->spi_pins_config;
|
||||
|
||||
try {
|
||||
spi = new FtdiSpi(cable.config, pins_config, args.freq, args.verbose > 0);
|
||||
spi = new FtdiSpi(cable, pins_config, args.freq, args.verbose > 0);
|
||||
} catch (std::exception &e) {
|
||||
printError("Error: Failed to claim cable");
|
||||
return EXIT_FAILURE;
|
||||
|
|
@ -871,7 +871,7 @@ void displaySupported(const struct arguments &args)
|
|||
t << setw(25) << left << "cable name" << "vid:pid";
|
||||
printSuccess(t.str());
|
||||
for (auto b = cable_list.begin(); b != cable_list.end(); b++) {
|
||||
FTDIpp_MPSSE::mpsse_bit_config c = (*b).second.config;
|
||||
cable_t c = (*b).second;
|
||||
stringstream ss;
|
||||
ss << setw(25) << left << (*b).first;
|
||||
ss << "0x" << hex << right << setw(4) << setfill('0') << c.vid << ":" << setw(4) << c.pid;
|
||||
|
|
|
|||
|
|
@ -37,15 +37,14 @@ using namespace std;
|
|||
#define display(...) do {}while(0)
|
||||
#endif
|
||||
|
||||
UsbBlaster::UsbBlaster(int vid, int pid, const std::string &firmware_path,
|
||||
UsbBlaster::UsbBlaster(const cable_t &cable, const std::string &firmware_path,
|
||||
uint8_t verbose):
|
||||
_verbose(verbose), _nb_bit(0),
|
||||
_curr_tms(0), _buffer_size(64)
|
||||
{
|
||||
(void) vid;
|
||||
if (pid == 0x6001)
|
||||
if (cable.pid == 0x6001)
|
||||
ll_driver = new UsbBlasterI();
|
||||
else if (pid == 0x6810)
|
||||
else if (cable.pid == 0x6810)
|
||||
ll_driver = new UsbBlasterII(firmware_path);
|
||||
else
|
||||
throw std::runtime_error("usb-blaster: unknown VID/PID");
|
||||
|
|
@ -60,7 +59,7 @@ UsbBlaster::UsbBlaster(int vid, int pid, const std::string &firmware_path,
|
|||
memset(_in_buf, 0, _buffer_size);
|
||||
|
||||
/* Force flush internal FT245 internal buffer */
|
||||
if (pid == 0x6001) {
|
||||
if (cable.pid == 0x6001) {
|
||||
uint8_t val = DEFAULT | DO_WRITE | DO_BITBB | _tms_pin;
|
||||
uint8_t tmp_buf[4096];
|
||||
for (_nb_bit = 0; _nb_bit < 4096; _nb_bit += 2) {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "board.hpp"
|
||||
#include "cable.hpp"
|
||||
#include "jtagInterface.hpp"
|
||||
#include "ftdipp_mpsse.hpp"
|
||||
#include "fx2_ll.hpp"
|
||||
|
|
@ -40,7 +40,7 @@ class UsbBlaster_ll {
|
|||
|
||||
class UsbBlaster : public JtagInterface {
|
||||
public:
|
||||
UsbBlaster(int vid, int pid, const std::string &firmware_path,
|
||||
UsbBlaster(const cable_t &cable, const std::string &firmware_path,
|
||||
uint8_t verbose = 0);
|
||||
virtual ~UsbBlaster();
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ XVC_server::XVC_server(int port, const cable_t & cable,
|
|||
(void)firmware_path;
|
||||
switch (cable.type) {
|
||||
case MODE_FTDI_SERIAL:
|
||||
_jtag = new FtdiJtagMPSSE(cable.config, dev, serial, clkHZ,
|
||||
_jtag = new FtdiJtagMPSSE(cable, dev, serial, clkHZ,
|
||||
invert_read_edge, _verbose);
|
||||
break;
|
||||
#if 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue