* https://github.com/jawi/ols/wiki/OLS-data-file-format
*/
+#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
-#include "libsigrok.h"
+#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
#define LOG_PREFIX "output/ols"
(void)options;
- if (!(ctx = g_try_malloc(sizeof(struct context)))) {
- sr_err("%s: ctx malloc failed", __func__);
- return SR_ERR_MALLOC;
- }
+ ctx = g_malloc0(sizeof(struct context));
o->priv = ctx;
-
ctx->samplerate = 0;
ctx->num_samples = 0;
.id = "ols",
.name = "OLS",
.desc = "OpenBench Logic Sniffer",
+ .exts = (const char*[]){"ols", NULL},
+ .flags = 0,
.options = NULL,
.init = init,
.receive = receive,