output modules now register the DF type they can use
This commit is contained in:
parent
8d67255061
commit
f0411b1d17
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
2
sigrok.h
2
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);
|
||||
|
|
Loading…
Reference in New Issue