X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fftdi-la%2Fapi.c;h=6eb51763853f96195e799169ef8cdf85a114a5dc;hb=082ca8d8bc3dc326cd0507a203dfedd0ea0b7de6;hp=cee2f0328fdb0ee60f3abc37f35a0b3617261f7a;hpb=c7a51272a58739c33f544eb84d9db94a2b7e8b45;p=libsigrok.git diff --git a/src/hardware/ftdi-la/api.c b/src/hardware/ftdi-la/api.c index cee2f032..6eb51763 100644 --- a/src/hardware/ftdi-la/api.c +++ b/src/hardware/ftdi-la/api.c @@ -57,6 +57,17 @@ static const struct ftdi_chip_desc ft2232h_desc = { } }; +static const struct ftdi_chip_desc ft2232h_tumpa_desc = { + .vendor = 0x0403, + .product = 0x8a98, + .samplerate_div = 20, + /* 20 pin JTAG header */ + .channel_names = { + "TCK", "TDI", "TDO", "TMS", "RST", "nTRST", "DBGRQ", "RTCK", + NULL + } +}; + static const struct ftdi_chip_desc ft232r_desc = { .vendor = 0x0403, .product = 0x6001, @@ -79,8 +90,10 @@ static const struct ftdi_chip_desc ft232h_desc = { static const struct ftdi_chip_desc *chip_descs[] = { &ft2232h_desc, + &ft2232h_tumpa_desc, &ft232r_desc, &ft232h_desc, + NULL, }; static void scan_device(struct ftdi_context *ftdic, @@ -98,13 +111,15 @@ static void scan_device(struct ftdi_context *ftdic, desc = NULL; for (unsigned long i = 0; i < ARRAY_SIZE(chip_descs); i++) { desc = chip_descs[i]; + if (!desc) + break; if (desc->vendor == usb_desc.idVendor && desc->product == usb_desc.idProduct) break; } if (!desc) { - sr_spew("Unsupported FTDI device 0x%4x:0x%4x.", + sr_spew("Unsupported FTDI device 0x%04x:0x%04x.", usb_desc.idVendor, usb_desc.idProduct); return; }