From: Bert Vermeulen Date: Sun, 9 Jan 2011 22:22:48 +0000 (+0100) Subject: output modules now register the DF type they can use X-Git-Tag: libsigrok-0.1.0~463 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f0411b1d170aa60c3aa79b12e88f53b225ea350d;p=libsigrok.git output modules now register the DF type they can use --- diff --git a/output/output_binary.c b/output/output_binary.c index 2045a579..41a8caee 100644 --- a/output/output_binary.c +++ b/output/output_binary.c @@ -64,6 +64,7 @@ static int data(struct output *o, char *data_in, uint64_t length_in, struct output_format output_binary = { "binary", "Raw binary", + DF_LOGIC, NULL, data, event, diff --git a/output/output_gnuplot.c b/output/output_gnuplot.c index 51648c44..94c566fa 100644 --- a/output/output_gnuplot.c +++ b/output/output_gnuplot.c @@ -193,6 +193,7 @@ static int data(struct output *o, char *data_in, uint64_t length_in, struct output_format output_gnuplot = { "gnuplot", "Gnuplot", + DF_LOGIC, init, data, event, diff --git a/output/output_skeleton.c b/output/output_skeleton.c index d96d41ab..91ee9171 100644 --- a/output/output_skeleton.c +++ b/output/output_skeleton.c @@ -40,6 +40,7 @@ static int event(struct output *o, int event_type, char **data_out, struct output_format output_foo = { "foo", "The foo format", + DF_LOGIC, init, data, event, diff --git a/output/output_text.c b/output/output_text.c index 79ec794e..cc3cb4e1 100644 --- a/output/output_text.c +++ b/output/output_text.c @@ -307,6 +307,7 @@ static int data_hex(struct output *o, char *data_in, uint64_t length_in, struct output_format output_text_bits = { "bits", "Text (bits)", + DF_LOGIC, init_bits, data_bits, event, @@ -315,6 +316,7 @@ struct output_format output_text_bits = { struct output_format output_text_hex = { "hex", "Text (hexadecimal)", + DF_LOGIC, init_hex, data_hex, event, diff --git a/output/output_vcd.c b/output/output_vcd.c index eea2f0e5..190e9e45 100644 --- a/output/output_vcd.c +++ b/output/output_vcd.c @@ -217,6 +217,7 @@ static int data(struct output *o, char *data_in, uint64_t length_in, struct output_format output_vcd = { "vcd", "Value Change Dump (VCD)", + DF_LOGIC, init, data, event, diff --git a/sigrok.h b/sigrok.h index ddfa4034..be82f4b5 100644 --- a/sigrok.h +++ b/sigrok.h @@ -95,7 +95,6 @@ enum { DF_TRIGGER, DF_LOGIC, DF_PD, - DF_PA, }; struct datafeed_packet { @@ -145,6 +144,7 @@ struct output { struct output_format { char *extension; char *description; + int df_type; int (*init) (struct output *o); int (*data) (struct output *o, char *data_in, uint64_t length_in, char **data_out, uint64_t *length_out);