]> sigrok.org Git - libsigrok.git/commit
serial-lcr: move probe, dev inst creation, data read out of scan
authorGerhard Sittig <redacted>
Sun, 16 Jun 2019 12:51:16 +0000 (14:51 +0200)
committerUwe Hermann <redacted>
Wed, 31 Jul 2019 13:23:03 +0000 (15:23 +0200)
commitc4d2e6fa5ee4f238afc6a91df9c0362281b213ce
tree2b1b50af9f57b767d79c219e6d2a56832d77720a
parent0fb45121254b159e1dabf8fd3f3bbd84e4aa693d
serial-lcr: move probe, dev inst creation, data read out of scan

Move the initial device probe (LCR packet validity check), the creation
of the device instance after successful probe, and the subsequent packet
inspection after resource allocation out of the scan routine. This shall
improve readability of the serial-lcr driver's probe logic, and reduces
diffs when handling of multiple connections gets added later.

Add a developer comment, the serial-lcr driver needs to handle multiple
connections when the conn= spec is ambiguous (multiple cables of the
same type, with the same VID:PID).
src/hardware/serial-lcr/api.c