From: Gerhard Sittig Date: Mon, 31 Jan 2022 20:49:42 +0000 (+0100) Subject: kingst-la2016: developer comment on capture data layout for 32ch models X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=9684b6507fd2ca750b4cb8796e4f5f34019e411b;p=libsigrok.git kingst-la2016: developer comment on capture data layout for 32ch models The implementation assumes that capture data comes in 16byte chunks which carry 5 packets of one 16bit sample and an 8bit repeat count each. Which may not apply to models with 32 channels, the current compile time literal may need to become a runtime depending value. Add a comment. --- diff --git a/src/hardware/kingst-la2016/protocol.c b/src/hardware/kingst-la2016/protocol.c index a49e96ed..a92c822a 100644 --- a/src/hardware/kingst-la2016/protocol.c +++ b/src/hardware/kingst-la2016/protocol.c @@ -96,7 +96,14 @@ static const struct kingst_model models[] = { #define RUNSTATE_TRGD_BIT (1UL << 2) #define RUNSTATE_POST_BIT (1UL << 3) -/* Properties related to the layout of capture data downloads. */ +/* + * Properties related to the layout of capture data downloads. + * + * TODO Check the layout of 32 channel models' capture data. Could it be + * 3x (u32 + u8) instead of 5x (u16 + u8) perhaps? Same 16 bytes chunk + * but fewer packets per chunk and thus per transfer? Which questions + * the NUM_PACKETS_IN_CHUNK literal, maybe needs to be a runtime value? + */ #define NUM_PACKETS_IN_CHUNK 5 #define TRANSFER_PACKET_LENGTH 16