X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=output%2Foutput_skeleton.c;h=af82d5b4a80266a5bbcdc73e55d41d7cf96fb2c0;hb=d494a4aa9dcbd90126d86757d16fa3e0f0a419f3;hp=4a3f280ecfb772949016c9bd928c6aafa4e6fd8f;hpb=25e7d9b115e5ea08be2d92ffe286aa1bf95778f4;p=libsigrok.git diff --git a/output/output_skeleton.c b/output/output_skeleton.c index 4a3f280e..af82d5b4 100644 --- a/output/output_skeleton.c +++ b/output/output_skeleton.c @@ -18,36 +18,30 @@ */ #include -#include "sigrok.h" +#include -static int init(struct output *o) +static int init(struct sr_output *o) { return 0; } - -static int data(struct output *o, char *data_in, uint64_t length_in, char **data_out, uint64_t *length_out) +static int data(struct sr_output *o, const char *data_in, uint64_t length_in, + char **data_out, uint64_t *length_out) { - - return SIGROK_OK; + return SR_OK; } - -static int event(struct output *o, int event_type, char **data_out, uint64_t *length_out) +static int event(struct sr_output *o, int event_type, char **data_out, + uint64_t *length_out) { - - return SIGROK_OK; + return SR_OK; } - - - -struct output_format output_foo = { - "foo", - "The foo format", - init, - data, - event +struct sr_output_format output_foo = { + .extension = "foo", + .description = "The foo format", + .df_type = SR_DF_LOGIC, + .init = init, + .data = data, + .event = event, }; - -