]> sigrok.org Git - libsigrok.git/commit - src/hardware/asix-sigma/api.c
asix-sigma: rework scan for USB devices, add support for conn= specs
authorGerhard Sittig <redacted>
Sun, 3 May 2020 15:02:17 +0000 (17:02 +0200)
committerGerhard Sittig <redacted>
Fri, 29 May 2020 05:49:50 +0000 (07:49 +0200)
commit53a939aba599af471fc82101c823ec7e4d574ac9
tree3b5fb71e3b0b655c24b9c5688a47a8c0589fbb40
parent742368a2bc2e4a01b0fbcdc6d5aa2bb4c0bcda4c
asix-sigma: rework scan for USB devices, add support for conn= specs

Stick with the FTDI library for data acquisition, and most of all for
firmware upload (bitbang is needed during FPGA configuration). Removing
this dependency is more complex, and needs to get addressed later.

Re-use common USB support during scan before open, which also allows to
select devices if several of them are connected. Either of "conn=vid.pid"
or "conn=bus.addr" formats are supported and were tested.

This implementation detects and displays SIGMA and SIGMA2 devices. Though
their function is identical, users may want to see the respective device
name. Optionally detect OMEGA devices, too (compile time option, off by
default), though they currently are not supported beyond detection. They
just show up during scans for ASIX logic analyzers, and users may want to
have them listed, too, for awareness.

This implementation also improves robustness when devices get disconnected
between scan and use. The open and close routines now always create the
FTDI contexts after the code has moved out of the scan phase, where common
USB support code is used.

This resolves bug #841.
src/hardware/asix-sigma/api.c
src/hardware/asix-sigma/protocol.h