From d75d8a7c40011cdc15be8330b5efbdf812c4fe27 Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Sun, 10 Nov 2013 12:42:11 +0100 Subject: Implement OUTPUT_BINARY This requires the PD to have a tuple in its class called 'binary', which contains a list of strings describing the different binary classes it can output. For the SPI decoder this might be 'MOSI' and 'MISO', for example. The data is submitted to the frontend as struct srd_proto_data_binary, which contains the class that data belongs to. --- libsigrokdecode.h.in | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libsigrokdecode.h.in') diff --git a/libsigrokdecode.h.in b/libsigrokdecode.h.in index a654373..b759428 100644 --- a/libsigrokdecode.h.in +++ b/libsigrokdecode.h.in @@ -202,6 +202,12 @@ struct srd_decoder { */ GSList *annotations; + /** + * List of NULL-terminated char[], containing descriptions of the + * supported binary output. + */ + GSList *binary; + /** List of decoder options. */ GSList *options; @@ -266,6 +272,11 @@ struct srd_proto_data_annotation { int ann_format; char **ann_text; }; +struct srd_proto_data_binary { + int bin_class; + uint64_t size; + const unsigned char *data; +}; typedef void (*srd_pd_output_callback_t)(struct srd_proto_data *pdata, void *cb_data); -- cgit v1.2.3-70-g09d2