cable: bus_addr, device_addr: int -> uint8_t
This commit is contained in:
parent
b3c9364b82
commit
7f1f9445d4
|
|
@ -56,23 +56,23 @@ struct cable_t {
|
||||||
communication_type type; /*! see enum communication_type */
|
communication_type type; /*! see enum communication_type */
|
||||||
int vid; /*! Vendor ID */
|
int vid; /*! Vendor ID */
|
||||||
int pid; /*! Product ID */
|
int pid; /*! Product ID */
|
||||||
int bus_addr; /*! bus number (must be set to -1: user defined */
|
uint8_t bus_addr; /*! bus number (must be set to 0: user defined */
|
||||||
int device_addr; /*! device number (must be set -1: user defined */
|
uint8_t device_addr; /*! device number (must be set 0: user defined */
|
||||||
mpsse_bit_config config; /*! FTDI specific configurations */
|
mpsse_bit_config config; /*! FTDI specific configurations */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* FTDI serial (MPSSE) configuration */
|
/* FTDI serial (MPSSE) configuration */
|
||||||
#define FTDI_SER(_vid, _pid, _intf, _blv, _bld, _bhv, _bhd) \
|
#define FTDI_SER(_vid, _pid, _intf, _blv, _bld, _bhv, _bhd) \
|
||||||
{MODE_FTDI_SERIAL, _vid, _pid, -1, -1, {_intf, _blv, _bld, _bhv, _bhd, 0}}
|
{MODE_FTDI_SERIAL, _vid, _pid, 0, 0, {_intf, _blv, _bld, _bhv, _bhd, 0}}
|
||||||
/* FTDI bitbang configuration */
|
/* FTDI bitbang configuration */
|
||||||
#define FTDI_BB(_vid, _pid, _intf, _blv, _bld, _bhv, _bhd) \
|
#define FTDI_BB(_vid, _pid, _intf, _blv, _bld, _bhv, _bhd) \
|
||||||
{MODE_FTDI_BITBANG, _vid, _pid, -1, -1, {_intf, _blv, _bld, _bhv, _bhd, 0}}
|
{MODE_FTDI_BITBANG, _vid, _pid, 0, 0, {_intf, _blv, _bld, _bhv, _bhd, 0}}
|
||||||
/* CMSIS DAP configuration */
|
/* CMSIS DAP configuration */
|
||||||
#define CMSIS_CL(_vid, _pid) \
|
#define CMSIS_CL(_vid, _pid) \
|
||||||
{MODE_CMSISDAP, _vid, _pid, -1, -1, {}}
|
{MODE_CMSISDAP, _vid, _pid, 0, 0, {}}
|
||||||
/* Others cable configuration */
|
/* Others cable configuration */
|
||||||
#define CABLE_DEF(_type, _vid, _pid) \
|
#define CABLE_DEF(_type, _vid, _pid) \
|
||||||
{_type, _vid, _pid, -1, -1, {}}
|
{_type, _vid, _pid, 0, 0, {}}
|
||||||
|
|
||||||
static std::map <std::string, cable_t> cable_list = {
|
static std::map <std::string, cable_t> cable_list = {
|
||||||
// last 4 bytes are ADBUS7-0 value, ADBUS7-0 direction, ACBUS7-0 value, ACBUS7-0 direction
|
// last 4 bytes are ADBUS7-0 value, ADBUS7-0 direction, ACBUS7-0 value, ACBUS7-0 direction
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ void FtdiSpi::setMode(uint8_t mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
static cable_t cable = {
|
static cable_t cable = {
|
||||||
MODE_FTDI_SERIAL, 0x403, 0x6010, -1, -1, {INTERFACE_B, 0x08, 0x0B, 0x08, 0x0B, 0}
|
MODE_FTDI_SERIAL, 0x403, 0x6010, 0, 0, {INTERFACE_B, 0x08, 0x0B, 0x08, 0x0B, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
FtdiSpi::FtdiSpi(int vid, int pid, unsigned char interface, uint32_t clkHZ,
|
FtdiSpi::FtdiSpi(int vid, int pid, unsigned char interface, uint32_t clkHZ,
|
||||||
|
|
|
||||||
|
|
@ -75,8 +75,8 @@ struct arguments {
|
||||||
uint16_t vid;
|
uint16_t vid;
|
||||||
uint16_t pid;
|
uint16_t pid;
|
||||||
int16_t cable_index;
|
int16_t cable_index;
|
||||||
int8_t bus_addr;
|
uint8_t bus_addr;
|
||||||
int8_t device_addr;
|
uint8_t device_addr;
|
||||||
string ip_adr;
|
string ip_adr;
|
||||||
uint32_t protect_flash;
|
uint32_t protect_flash;
|
||||||
bool unprotect_flash;
|
bool unprotect_flash;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue