jtag: adding method to inject device into active device list
This commit is contained in:
parent
1f59dfd671
commit
dddee79f53
|
|
@ -178,8 +178,14 @@ bool Jtag::search_and_insert_device_with_idcode(uint32_t idcode)
|
||||||
if (irlength == -1)
|
if (irlength == -1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
_devices_list.insert(_devices_list.begin(), idcode);
|
return insert_first(idcode, irlength);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Jtag::insert_first(uint32_t device_id, uint16_t irlength)
|
||||||
|
{
|
||||||
|
_devices_list.insert(_devices_list.begin(), device_id);
|
||||||
_irlength_list.insert(_irlength_list.begin(), irlength);
|
_irlength_list.insert(_irlength_list.begin(), irlength);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
12
src/jtag.hpp
12
src/jtag.hpp
|
|
@ -19,7 +19,7 @@ class Jtag {
|
||||||
public:
|
public:
|
||||||
Jtag(cable_t &cable, const jtag_pins_conf_t *pin_conf, std::string dev,
|
Jtag(cable_t &cable, const jtag_pins_conf_t *pin_conf, std::string dev,
|
||||||
const std::string &serial, uint32_t clkHZ, int8_t verbose = 0,
|
const std::string &serial, uint32_t clkHZ, int8_t verbose = 0,
|
||||||
const std::string &firmware_path="");
|
const std::string &firmware_path = "");
|
||||||
~Jtag();
|
~Jtag();
|
||||||
|
|
||||||
/* maybe to update */
|
/* maybe to update */
|
||||||
|
|
@ -52,6 +52,13 @@ class Jtag {
|
||||||
* \return -1 if index is out of bound, index otherwise
|
* \return -1 if index is out of bound, index otherwise
|
||||||
*/
|
*/
|
||||||
uint16_t device_select(uint16_t index);
|
uint16_t device_select(uint16_t index);
|
||||||
|
/*!
|
||||||
|
* \brief inject a device into list at the begin
|
||||||
|
* \param[in] device_id: idcode
|
||||||
|
* \param[in] irlength: device irlength
|
||||||
|
* \return false if fails
|
||||||
|
*/
|
||||||
|
bool insert_first(uint32_t device_id, uint16_t irlength);
|
||||||
|
|
||||||
int shiftIR(unsigned char *tdi, unsigned char *tdo, int irlen,
|
int shiftIR(unsigned char *tdi, unsigned char *tdo, int irlen,
|
||||||
int end_state = RUN_TEST_IDLE);
|
int end_state = RUN_TEST_IDLE);
|
||||||
|
|
@ -95,7 +102,8 @@ class Jtag {
|
||||||
JtagInterface *_jtag;
|
JtagInterface *_jtag;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void init_internal(cable_t &cable, const std::string &dev, const std::string &serial,
|
void init_internal(cable_t &cable, const std::string &dev,
|
||||||
|
const std::string &serial,
|
||||||
const jtag_pins_conf_t *pin_conf, uint32_t clkHZ,
|
const jtag_pins_conf_t *pin_conf, uint32_t clkHZ,
|
||||||
const std::string &firmware_path);
|
const std::string &firmware_path);
|
||||||
/*!
|
/*!
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue