jtag: re-add lost dev parameter
This commit is contained in:
parent
7f1f11d58d
commit
deb3d0bed2
12
src/jtag.cpp
12
src/jtag.cpp
|
|
@ -70,7 +70,7 @@ Jtag::Jtag(cable_t &cable, const jtag_pins_conf_t *pin_conf, string dev,
|
||||||
_tms_buffer_size(128), _num_tms(0),
|
_tms_buffer_size(128), _num_tms(0),
|
||||||
_board_name("nope")
|
_board_name("nope")
|
||||||
{
|
{
|
||||||
init_internal(cable, pin_conf, clkHZ);
|
init_internal(cable, dev, pin_conf, clkHZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
Jtag::Jtag(cable_t &cable, const jtag_pins_conf_t *pin_conf,
|
Jtag::Jtag(cable_t &cable, const jtag_pins_conf_t *pin_conf,
|
||||||
|
|
@ -80,7 +80,7 @@ Jtag::Jtag(cable_t &cable, const jtag_pins_conf_t *pin_conf,
|
||||||
_tms_buffer_size(128), _num_tms(0),
|
_tms_buffer_size(128), _num_tms(0),
|
||||||
_board_name("nope")
|
_board_name("nope")
|
||||||
{
|
{
|
||||||
init_internal(cable, pin_conf, clkHZ);
|
init_internal(cable, NULL, pin_conf, clkHZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
Jtag::~Jtag()
|
Jtag::~Jtag()
|
||||||
|
|
@ -89,15 +89,15 @@ Jtag::~Jtag()
|
||||||
delete _jtag;
|
delete _jtag;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Jtag::init_internal(cable_t &cable, const jtag_pins_conf_t *pin_conf,
|
void Jtag::init_internal(cable_t &cable, const string &dev,
|
||||||
uint32_t clkHZ)
|
const jtag_pins_conf_t *pin_conf, uint32_t clkHZ)
|
||||||
{
|
{
|
||||||
if (cable.type == MODE_FTDI_BITBANG) {
|
if (cable.type == MODE_FTDI_BITBANG) {
|
||||||
if (pin_conf == NULL)
|
if (pin_conf == NULL)
|
||||||
throw std::exception();
|
throw std::exception();
|
||||||
_jtag = new FtdiJtagBitBang(cable.config, pin_conf, clkHZ, _verbose);
|
_jtag = new FtdiJtagBitBang(cable.config, pin_conf, dev, clkHZ, _verbose);
|
||||||
} else {
|
} else {
|
||||||
_jtag = new FtdiJtagMPSSE(cable.config, clkHZ, _verbose);
|
_jtag = new FtdiJtagMPSSE(cable.config, dev, clkHZ, _verbose);
|
||||||
}
|
}
|
||||||
|
|
||||||
_tms_buffer = (unsigned char *)malloc(sizeof(unsigned char) * _tms_buffer_size);
|
_tms_buffer = (unsigned char *)malloc(sizeof(unsigned char) * _tms_buffer_size);
|
||||||
|
|
|
||||||
|
|
@ -82,8 +82,8 @@ class Jtag {
|
||||||
void setVerbose(bool verbose){_verbose = verbose;}
|
void setVerbose(bool verbose){_verbose = verbose;}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void init_internal(cable_t &cable, const jtag_pins_conf_t *pin_conf,
|
void init_internal(cable_t &cable, const std::string &dev,
|
||||||
uint32_t clkHZ);
|
const jtag_pins_conf_t *pin_conf, uint32_t clkHZ);
|
||||||
bool _verbose;
|
bool _verbose;
|
||||||
int _state;
|
int _state;
|
||||||
int _tms_buffer_size;
|
int _tms_buffer_size;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue