all jtag interface: don't convert verbosity level to bool
This commit is contained in:
parent
8df01663ff
commit
952084cd1d
|
|
@ -44,7 +44,7 @@ enum analogicCableFreq {
|
|||
ANLOGICCABLE_FREQ_90K = 0xff
|
||||
};
|
||||
|
||||
AnlogicCable::AnlogicCable(uint32_t clkHZ, bool verbose):
|
||||
AnlogicCable::AnlogicCable(uint32_t clkHZ, uint8_t verbose):
|
||||
_verbose(verbose),
|
||||
dev_handle(NULL), usb_ctx(NULL), _tdi(0), _tms(0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
class AnlogicCable : public JtagInterface {
|
||||
public:
|
||||
AnlogicCable(uint32_t clkHZ, bool verbose);
|
||||
AnlogicCable(uint32_t clkHZ, uint8_t verbose);
|
||||
virtual ~AnlogicCable();
|
||||
|
||||
int setClkFreq(uint32_t clkHZ) override;
|
||||
|
|
@ -43,7 +43,7 @@ class AnlogicCable : public JtagInterface {
|
|||
int flush() override;
|
||||
|
||||
private:
|
||||
bool _verbose;
|
||||
uint8_t _verbose;
|
||||
|
||||
int write(uint8_t *in_buf, uint8_t *out_buf, int len, int rd_len);
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ using namespace std;
|
|||
#endif
|
||||
|
||||
CH552_jtag::CH552_jtag(const FTDIpp_MPSSE::mpsse_bit_config &cable,
|
||||
string dev, const string &serial, uint32_t clkHZ, bool verbose):
|
||||
string dev, const string &serial, uint32_t clkHZ, uint8_t verbose):
|
||||
FTDIpp_MPSSE(cable, dev, serial, clkHZ, verbose), _to_read(0)
|
||||
{
|
||||
init_internal(cable);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
class CH552_jtag : public JtagInterface, private FTDIpp_MPSSE {
|
||||
public:
|
||||
CH552_jtag(const FTDIpp_MPSSE::mpsse_bit_config &cable, std::string dev,
|
||||
const std::string &serial, uint32_t clkHZ, bool verbose = false);
|
||||
const std::string &serial, uint32_t clkHZ, uint8_t verbose = false);
|
||||
virtual ~CH552_jtag();
|
||||
|
||||
int setClkFreq(uint32_t clkHZ) override;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ enum cmsisdap_status {
|
|||
DAP_ERROR = 0xff
|
||||
};
|
||||
|
||||
CmsisDAP::CmsisDAP(int vid, int pid, bool verbose):_verbose(verbose),
|
||||
CmsisDAP::CmsisDAP(int vid, int pid, uint8_t verbose):_verbose(verbose),
|
||||
_device_idx(0), _vid(vid), _pid(pid),
|
||||
_serial_number(L""), _dev(NULL), _num_tms(0), _is_connect(false)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ class CmsisDAP: public JtagInterface {
|
|||
* else search for a compatible device
|
||||
* \param[in] vid: vendor id
|
||||
* \param[in] pid: product id
|
||||
* \param[in] verbose: verbose level false normal, true verbose
|
||||
* \param[in] verbose: verbose level 0 normal, 1 verbose
|
||||
*/
|
||||
CmsisDAP(const int vid, const int pid, bool verbose);
|
||||
CmsisDAP(const int vid, const int pid, uint8_t verbose);
|
||||
|
||||
~CmsisDAP();
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ class CmsisDAP: public JtagInterface {
|
|||
int writeJtagSequence(uint8_t tms, uint8_t *tx, uint8_t *rx,
|
||||
uint32_t len, bool end);
|
||||
|
||||
bool _verbose; /**< display more message */
|
||||
uint8_t _verbose; /**< display more message */
|
||||
int16_t _device_idx; /**< device index */
|
||||
uint16_t _vid; /**< device Vendor ID */
|
||||
uint16_t _pid; /**< device Product ID */
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ enum dirtyJtagSig {
|
|||
SIG_TMS = (1 << 4)
|
||||
};
|
||||
|
||||
DirtyJtag::DirtyJtag(uint32_t clkHZ, bool verbose):
|
||||
DirtyJtag::DirtyJtag(uint32_t clkHZ, uint8_t verbose):
|
||||
_verbose(verbose),
|
||||
dev_handle(NULL), usb_ctx(NULL), _tdi(0), _tms(0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
class DirtyJtag : public JtagInterface {
|
||||
public:
|
||||
DirtyJtag(uint32_t clkHZ, bool verbose);
|
||||
DirtyJtag(uint32_t clkHZ, uint8_t verbose);
|
||||
virtual ~DirtyJtag();
|
||||
|
||||
int setClkFreq(uint32_t clkHZ) override;
|
||||
|
|
@ -43,7 +43,7 @@ class DirtyJtag : public JtagInterface {
|
|||
int flush() override;
|
||||
|
||||
private:
|
||||
bool _verbose;
|
||||
uint8_t _verbose;
|
||||
|
||||
int sendBitBang(uint8_t mask, uint8_t val, uint8_t *read, bool last);
|
||||
void getVersion();
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ using namespace std;
|
|||
|
||||
FtdiJtagBitBang::FtdiJtagBitBang(const FTDIpp_MPSSE::mpsse_bit_config &cable,
|
||||
const jtag_pins_conf_t *pin_conf, string dev, const std::string &serial,
|
||||
uint32_t clkHZ, bool verbose):
|
||||
uint32_t clkHZ, uint8_t verbose):
|
||||
FTDIpp_MPSSE(cable, dev, serial, clkHZ, verbose), _bitmode(0),
|
||||
_curr_tms(0), _rx_size(0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class FtdiJtagBitBang : public JtagInterface, private FTDIpp_MPSSE {
|
|||
public:
|
||||
FtdiJtagBitBang(const FTDIpp_MPSSE::mpsse_bit_config &cable,
|
||||
const jtag_pins_conf_t *pin_conf, std::string dev, const std::string &serial,
|
||||
uint32_t clkHZ, bool verbose = false);
|
||||
uint32_t clkHZ, uint8_t verbose = 0);
|
||||
virtual ~FtdiJtagBitBang();
|
||||
|
||||
int setClkFreq(uint32_t clkHZ) override;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ using namespace std;
|
|||
#endif
|
||||
|
||||
FtdiJtagMPSSE::FtdiJtagMPSSE(const FTDIpp_MPSSE::mpsse_bit_config &cable,
|
||||
string dev, const string &serial, uint32_t clkHZ, bool verbose):
|
||||
string dev, const string &serial, uint32_t clkHZ, uint8_t verbose):
|
||||
FTDIpp_MPSSE(cable, dev, serial, clkHZ, verbose), _ch552WA(false),
|
||||
_write_mode(0), _read_mode(0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
class FtdiJtagMPSSE : public JtagInterface, private FTDIpp_MPSSE {
|
||||
public:
|
||||
FtdiJtagMPSSE(const FTDIpp_MPSSE::mpsse_bit_config &cable, std::string dev,
|
||||
const std::string &serial, uint32_t clkHZ, bool verbose = false);
|
||||
const std::string &serial, uint32_t clkHZ, uint8_t verbose = 0);
|
||||
virtual ~FtdiJtagMPSSE();
|
||||
|
||||
int setClkFreq(uint32_t clkHZ) override;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ using namespace std;
|
|||
do { if (_verbose) fprintf(stdout, __VA_ARGS__);}while(0)
|
||||
|
||||
FTDIpp_MPSSE::FTDIpp_MPSSE(const mpsse_bit_config &cable, const string &dev,
|
||||
const std::string &serial, uint32_t clkHZ, bool verbose):
|
||||
const std::string &serial, uint32_t clkHZ, uint8_t verbose):
|
||||
_verbose(verbose), _cable(cable), _vid(0),
|
||||
_pid(0), _bus(-1), _addr(-1),
|
||||
_interface(cable.interface),
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class FTDIpp_MPSSE {
|
|||
} mpsse_bit_config;
|
||||
|
||||
FTDIpp_MPSSE(const mpsse_bit_config &cable, const std::string &dev,
|
||||
const std::string &serial, uint32_t clkHZ, bool verbose = false);
|
||||
const std::string &serial, uint32_t clkHZ, uint8_t verbose = 0);
|
||||
~FTDIpp_MPSSE();
|
||||
|
||||
int init(unsigned char latency, unsigned char bitmask_mode,
|
||||
|
|
@ -67,7 +67,7 @@ class FTDIpp_MPSSE {
|
|||
int mpsse_get_buffer_size() {return _buffer_size;}
|
||||
unsigned int udevstufftoint(const char *udevstring, int base);
|
||||
bool search_with_dev(const std::string &device);
|
||||
bool _verbose;
|
||||
uint8_t _verbose;
|
||||
mpsse_bit_config _cable;
|
||||
int _vid;
|
||||
int _pid;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ using namespace std;
|
|||
Jtag::Jtag(cable_t &cable, const jtag_pins_conf_t *pin_conf, string dev,
|
||||
const string &serial, uint32_t clkHZ, int8_t verbose,
|
||||
const string &firmware_path):
|
||||
_verbose(verbose > 1),
|
||||
_verbose(verbose),
|
||||
_state(RUN_TEST_IDLE),
|
||||
_tms_buffer_size(128), _num_tms(0),
|
||||
_board_name("nope"), device_index(0)
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ using namespace std;
|
|||
#endif
|
||||
|
||||
UsbBlaster::UsbBlaster(int vid, int pid, const std::string &firmware_path,
|
||||
bool verbose):
|
||||
uint8_t verbose):
|
||||
_verbose(verbose), _nb_bit(0),
|
||||
_curr_tms(0), _buffer_size(64)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class UsbBlaster_ll {
|
|||
class UsbBlaster : public JtagInterface {
|
||||
public:
|
||||
UsbBlaster(int vid, int pid, const std::string &firmware_path,
|
||||
bool verbose = false);
|
||||
uint8_t verbose = 0);
|
||||
virtual ~UsbBlaster();
|
||||
|
||||
int setClkFreq(uint32_t clkHZ) override;
|
||||
|
|
@ -86,7 +86,7 @@ class UsbBlaster : public JtagInterface {
|
|||
int setBitmode(uint8_t mode);
|
||||
uint8_t *_in_buf;
|
||||
|
||||
bool _verbose;
|
||||
uint8_t _verbose;
|
||||
uint8_t _tck_pin; /*!< tck pin: 1 << pin id */
|
||||
uint8_t _tms_pin; /*!< tms pin: 1 << pin id */
|
||||
uint8_t _tdi_pin; /*!< tdi pin: 1 << pin id */
|
||||
|
|
|
|||
Loading…
Reference in New Issue