]> sigrok.org Git - libsigrok.git/commit
sysclk-lwla: Streamline packet output logic.
authorDaniel Elstner <redacted>
Sat, 18 Jan 2014 16:36:23 +0000 (17:36 +0100)
committerDaniel Elstner <redacted>
Sat, 18 Jan 2014 16:36:23 +0000 (17:36 +0100)
commit2cfd16a31672be2ef8227dcda407e8cc5a24607f
tree5154f4d0dbe9bf5fa9bf67a99df19ec3fc9888d4
parent29d587670df54e6dce281e942d1da0c0ee5a74f3
sysclk-lwla: Streamline packet output logic.

(process_sample_data): When expanding run-length samples into
session packets, calculate the number of samples to write in
advance while honoring all constraints.  This is cleaner than
checking constraints within the expansion loop.  Also, the new
logic always fills up packets exactly to whatever limit applies
first, thereby removing the need for truncation after the fact.
hardware/sysclk-lwla/protocol.c
hardware/sysclk-lwla/protocol.h