From: Gerhard Sittig Date: Thu, 24 Sep 2020 14:29:06 +0000 (+0200) Subject: serial: extend stream detect for variable length packet checkers X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=1a7adeac29d6331b53a2c78fc9c70429b32da0bd;hp=1a7adeac29d6331b53a2c78fc9c70429b32da0bd serial: extend stream detect for variable length packet checkers The previous implementation of the packet detection in a serial stream assumed that all packets are of equal length which is known in advance. Extend the packet validity check interface such that caller provided callbacks can either decide that the input is valid or invalid (terminal decision), or request more receive data before a decision can be made (deferral, coverring variable length packets, with a minimum size to cover the header before a length becomes available and the total packet length is known). This commit extends the API, and adjusts the call sites to not break the compilation. Actual variable length checkers are yet to be done. Improve readability while we are here: Better reflect the purpose and units of variables in their identifiers. Tweak diagnostics messages, update inline and doxygen comments. ---