#include <stdlib.h>
#include <string.h>
#include <glib.h>
-#include <sigrok.h>
+#include "sigrok.h"
+#include "sigrok-internal.h"
#include "text.h"
-int init_bits(struct sr_output *o)
+SR_PRIV int init_bits(struct sr_output *o)
{
return init(o, DEFAULT_BPL_BITS, MODE_BITS);
}
-int data_bits(struct sr_output *o, const char *data_in, uint64_t length_in,
- char **data_out, uint64_t *length_out)
+SR_PRIV int data_bits(struct sr_output *o, const char *data_in,
+ uint64_t length_in, char **data_out, uint64_t *length_out)
{
struct context *ctx;
unsigned int outsize, offset, p;
}
}
} else {
- g_message("short buffer (length_in=%" PRIu64 ")", length_in);
+ sr_info("short buffer (length_in=%" PRIu64 ")", length_in);
}
*data_out = outbuf;
return SR_OK;
}
-struct sr_output_format output_text_bits = {
- .extension = "bits",
+SR_PRIV struct sr_output_format output_text_bits = {
+ .id = "bits",
.description = "Bits (takes argument, default 64)",
.df_type = SR_DF_LOGIC,
.init = init_bits,