X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=output%2Foutput_skeleton.c;h=e4b3baf61c46532bfdbf4887b50fb81951ccd3b1;hb=c91404191e6b31ffe40edd8de469876a02c81d57;hp=6bd885f9e797cef14f9fde3b6828fe56ef2ea9ae;hpb=a1bb33afbde769156ad4bef7a60579da64aebbb7;p=libsigrok.git diff --git a/output/output_skeleton.c b/output/output_skeleton.c index 6bd885f9..e4b3baf6 100644 --- a/output/output_skeleton.c +++ b/output/output_skeleton.c @@ -18,41 +18,30 @@ */ #include +#include -#include "sigrok.h" - - - -static void 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 = { +struct sr_output_format output_foo = { "foo", "The foo format", + SR_DF_LOGIC, init, data, - event + event, }; - -