handle other blaster PIDs

This commit is contained in:
Alberto Perro 2025-12-15 12:56:08 +01:00 committed by Gwenhael Goavec-Merou
parent 14086df9a2
commit 4d93073e99
2 changed files with 5 additions and 2 deletions

View File

@ -131,7 +131,10 @@ static std::map <std::string, cable_t> cable_list = {
{"steppenprobe", FTDI_SER(0x0403, 0x6010, FTDI_INTF_A, 0x58, 0xFB, 0x00, 0x99)},
{"tigard", FTDI_SER(0x0403, 0x6010, FTDI_INTF_B, 0x08, 0x3B, 0x00, 0x00)},
{"usb-blaster", CABLE_DEF(MODE_USBBLASTER, 0x09Fb, 0x6001 )},
{"usb-blaster_1", CABLE_DEF(MODE_USBBLASTER, 0x09Fb, 0x6002 )},
{"usb-blaster_2", CABLE_DEF(MODE_USBBLASTER, 0x09Fb, 0x6003 )},
{"usb-blasterII", CABLE_DEF(MODE_USBBLASTER, 0x09Fb, 0x6810 )},
{"usb-blasterII_1", CABLE_DEF(MODE_USBBLASTER, 0x09Fb, 0x6010 )},
{"usb-blasterIII", FTDI_SER(0x09fb, 0x6022, FTDI_INTF_A, 0x08, 0x3B, 0x00, 0x00)},
{"xvc-client", CABLE_DEF(MODE_XVC_CLIENT, 0x0000, 0x0000 )},
#ifdef ENABLE_LIBGPIOD

View File

@ -44,14 +44,14 @@ UsbBlaster::UsbBlaster(const cable_t &cable, const std::string &firmware_path,
_verbose(verbose > 1), _nb_bit(0),
_curr_tms(0), _buffer_size(64)
{
if (cable.pid == 0x6001)
if (cable.pid == 0x6001 || cable.pid == 0x6002 || cable.pid == 0x6003)
#ifdef ENABLE_USB_BLASTERI
ll_driver = new UsbBlasterI();
#else
throw std::runtime_error("usb-blasterI: Not build");
#endif
#ifdef ENABLE_USB_BLASTERII
else if (cable.pid == 0x6810)
else if (cable.pid == 0x6810 || cable.pid == 0x6010)
ll_driver = new UsbBlasterII(firmware_path);
#else
throw std::runtime_error("usb-blasterII: Not build");