]> sigrok.org Git - libsigrok.git/commitdiff
ols: move sigrok channel creation from protocol.c to api.c
authorGerhard Sittig <redacted>
Sun, 14 Aug 2022 19:07:07 +0000 (21:07 +0200)
committerGerhard Sittig <redacted>
Wed, 24 Aug 2022 18:05:25 +0000 (20:05 +0200)
It's unexpected that several code paths redundantly create sigrok
channels, and that most of them reside in the protocol.c source file.
Concentrate channel creation in api.c instead in the scan() routine,
to remain aware during maintenance.

Fallback to the maximum channel count for SUMP compatibles, prefer
metadata gathered from the device when available, including quirks for
models which are known to deviate. Just setup the number during probe,
and create the channels at the end of scan() in common code.

Change the channel count struct member to unsigned while we are here.
Shorten a long comment line to not have to break it.


No differences found