From 460e6cfa5d45c8d2ba0f5be1235ab31d4ec9508b Mon Sep 17 00:00:00 2001 From: Soeren Apel Date: Sun, 1 Mar 2020 16:50:46 +0100 Subject: Remove samplerate from srd_decoder_logic_output_channel This means that the samplerate for logic output channels is implicitly determined by the input channel samplerate. The motivation for this is that hard-coding a samplerate isn't possible - but at the same time, it's also not possible to determine the samplerate at the time the logic output channels are initialized, as the samplerate can be set at runtime. From my point of view, we would need one of two mechanisms to make this work: 1) Allow creation of logic outputs at runtime via some registration callback or 2) Allow changing a logic output's samplerate after it has been created, again requiring some kind of callback To me, both currently are overkill because making the assumption that samplerate_in = samplerate_out not only makes this problem go away as it can easily be handled on the client side where samplerate_in is already known, it also makes handling of the logic data in the PDs easier. --- libsigrokdecode.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libsigrokdecode.h') diff --git a/libsigrokdecode.h b/libsigrokdecode.h index 4440267..30282f5 100644 --- a/libsigrokdecode.h +++ b/libsigrokdecode.h @@ -190,7 +190,7 @@ struct srd_decoder { GSList *binary; /** - * List of logic output channels (item: id, description, samplerate). + * List of logic output channels (item: id, description). */ GSList *logic_output_channels; @@ -241,7 +241,6 @@ struct srd_decoder_annotation_row { struct srd_decoder_logic_output_channel { char *id; char *desc; - uint64_t samplerate; }; struct srd_decoder_inst { -- cgit v1.2.3-70-g09d2