X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fftdi-la%2Fapi.c;h=432f566f84ed71a00f38b077e065a0c28b926de7;hb=e4204b1757459a03c0a70849a659f27387edc295;hp=b22e57f1a883f07572dd232c7c8534366c786f88;hpb=8686b747cd40695c36f998603f6e853ee5eea883;p=libsigrok.git diff --git a/src/hardware/ftdi-la/api.c b/src/hardware/ftdi-la/api.c index b22e57f1..432f566f 100644 --- a/src/hardware/ftdi-la/api.c +++ b/src/hardware/ftdi-la/api.c @@ -67,9 +67,21 @@ static const struct ftdi_chip_desc ft232r_desc = { } }; +static const struct ftdi_chip_desc ft232h_desc = { + .vendor = 0x0403, + .product = 0x6014, + .samplerate_div = 30, + .channel_names = { + "ADBUS0", "ADBUS1", "ADBUS2", "ADBUS3", "ADBUS4", "ADBUS5", "ADBUS6", "ADBUS7", + NULL + } +}; + static const struct ftdi_chip_desc *chip_descs[] = { &ft2232h_desc, &ft232r_desc, + &ft232h_desc, + NULL, }; static void scan_device(struct ftdi_context *ftdic, @@ -87,13 +99,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; }