]> sigrok.org Git - libsigrok.git/commit - src/hardware/kingst-la2016/protocol.h
kingst-la2016: address style issues in api.c scan and open
authorGerhard Sittig <redacted>
Sun, 23 Jan 2022 20:00:53 +0000 (21:00 +0100)
committerGerhard Sittig <redacted>
Sun, 6 Feb 2022 17:53:53 +0000 (18:53 +0100)
commit520a20e90b7a20123a1cb83e80f8d6f29e1e5316
tree476964ffe2dc979cea3595f60dff83459ba3703e
parent411ad77c05aca0fe83e9cde2f87ab476f8d7d2ff
kingst-la2016: address style issues in api.c scan and open

Improve readability and fixup coding style of the scan(), dev_open(),
and la2016_dev_open() routines. Factor out common subexpressions, trim
text line length, adjust data types, eliminate sizeof() type redundancy.
Propagate returned error codes, check the USB enumeration result before
iteration. Drop the devc member which used to hold the sigrok context.
Release the sample data conversion buffer when acquisition start fails.
src/hardware/kingst-la2016/api.c
src/hardware/kingst-la2016/protocol.h