#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)
{
return init(o, DEFAULT_BPL_BITS, MODE_BITS);
char *outbuf, c;
ctx = o->internal;
- max_linelen = MAX_PROBENAME_LEN + 3 + ctx->samples_per_line
+ max_linelen = SR_MAX_PROBENAME_LEN + 3 + ctx->samples_per_line
+ ctx->samples_per_line / 8;
/*
* Calculate space needed for probes. Set aside 512 bytes for
}
}
} 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 = {
- "bits",
- "Bits (takes argument, default 64)",
- SR_DF_LOGIC,
- init_bits,
- data_bits,
- event,
+ .id = "bits",
+ .description = "Bits (takes argument, default 64)",
+ .df_type = SR_DF_LOGIC,
+ .init = init_bits,
+ .data = data_bits,
+ .event = event,
};
-