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 = {
|
struct output_format output_binary = {
|
||||||
"binary",
|
"binary",
|
||||||
"Raw binary",
|
"Raw binary",
|
||||||
|
DF_LOGIC,
|
||||||
NULL,
|
NULL,
|
||||||
data,
|
data,
|
||||||
event,
|
event,
|
||||||
|
|
|
@ -193,6 +193,7 @@ static int data(struct output *o, char *data_in, uint64_t length_in,
|
||||||
struct output_format output_gnuplot = {
|
struct output_format output_gnuplot = {
|
||||||
"gnuplot",
|
"gnuplot",
|
||||||
"Gnuplot",
|
"Gnuplot",
|
||||||
|
DF_LOGIC,
|
||||||
init,
|
init,
|
||||||
data,
|
data,
|
||||||
event,
|
event,
|
||||||
|
|
|
@ -40,6 +40,7 @@ static int event(struct output *o, int event_type, char **data_out,
|
||||||
struct output_format output_foo = {
|
struct output_format output_foo = {
|
||||||
"foo",
|
"foo",
|
||||||
"The foo format",
|
"The foo format",
|
||||||
|
DF_LOGIC,
|
||||||
init,
|
init,
|
||||||
data,
|
data,
|
||||||
event,
|
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 = {
|
struct output_format output_text_bits = {
|
||||||
"bits",
|
"bits",
|
||||||
"Text (bits)",
|
"Text (bits)",
|
||||||
|
DF_LOGIC,
|
||||||
init_bits,
|
init_bits,
|
||||||
data_bits,
|
data_bits,
|
||||||
event,
|
event,
|
||||||
|
@ -315,6 +316,7 @@ struct output_format output_text_bits = {
|
||||||
struct output_format output_text_hex = {
|
struct output_format output_text_hex = {
|
||||||
"hex",
|
"hex",
|
||||||
"Text (hexadecimal)",
|
"Text (hexadecimal)",
|
||||||
|
DF_LOGIC,
|
||||||
init_hex,
|
init_hex,
|
||||||
data_hex,
|
data_hex,
|
||||||
event,
|
event,
|
||||||
|
|
|
@ -217,6 +217,7 @@ static int data(struct output *o, char *data_in, uint64_t length_in,
|
||||||
struct output_format output_vcd = {
|
struct output_format output_vcd = {
|
||||||
"vcd",
|
"vcd",
|
||||||
"Value Change Dump (VCD)",
|
"Value Change Dump (VCD)",
|
||||||
|
DF_LOGIC,
|
||||||
init,
|
init,
|
||||||
data,
|
data,
|
||||||
event,
|
event,
|
||||||
|
|
2
sigrok.h
2
sigrok.h
|
@ -95,7 +95,6 @@ enum {
|
||||||
DF_TRIGGER,
|
DF_TRIGGER,
|
||||||
DF_LOGIC,
|
DF_LOGIC,
|
||||||
DF_PD,
|
DF_PD,
|
||||||
DF_PA,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct datafeed_packet {
|
struct datafeed_packet {
|
||||||
|
@ -145,6 +144,7 @@ struct output {
|
||||||
struct output_format {
|
struct output_format {
|
||||||
char *extension;
|
char *extension;
|
||||||
char *description;
|
char *description;
|
||||||
|
int df_type;
|
||||||
int (*init) (struct output *o);
|
int (*init) (struct output *o);
|
||||||
int (*data) (struct output *o, char *data_in, uint64_t length_in,
|
int (*data) (struct output *o, char *data_in, uint64_t length_in,
|
||||||
char **data_out, uint64_t *length_out);
|
char **data_out, uint64_t *length_out);
|
||||||
|
|
Loading…
Reference in New Issue