#define LOG_PREFIX "input/binary"
-#define MAX_CHUNK_SIZE (4 * 1024 * 1024)
+#define CHUNK_SIZE (4 * 1024 * 1024)
#define DEFAULT_NUM_CHANNELS 8
#define DEFAULT_SAMPLERATE 0
for (i = 0; i < chunk_size; i += chunk) {
logic.data = in->buf->str + i;
- chunk = MIN(MAX_CHUNK_SIZE, chunk_size - i);
+ chunk = MIN(CHUNK_SIZE, chunk_size - i);
logic.length = chunk;
sr_session_send(in->sdi, &packet);
}
#define DEFAULT_NUM_CHANNELS 8
#define DEFAULT_SAMPLERATE SR_MHZ(100)
-#define MAX_CHUNK_SIZE (4 * 1024)
+#define CHUNK_SIZE (4 * 1024)
#define CHRONOVU_LA8_FILESIZE ((8 * 1024 * 1024) + 5)
struct context {
for (i = 0; i < chunk_size; i += chunk) {
logic.data = in->buf->str + i;
- chunk = MIN(MAX_CHUNK_SIZE, chunk_size - i);
+ chunk = MIN(CHUNK_SIZE, chunk_size - i);
logic.length = chunk;
sr_session_send(in->sdi, &packet);
}
#define LOG_PREFIX "input/csv"
-#define DATAFEED_MAX_SAMPLES (128 * 1024)
+#define CHUNK_SIZE (128 * 1024)
/*
* The CSV input module has the following options:
* to a location within that large buffer.
*/
inc->sample_unit_size = (inc->num_channels + 7) / 8;
- inc->datafeed_buf_size = DATAFEED_MAX_SAMPLES;
+ inc->datafeed_buf_size = CHUNK_SIZE;
inc->datafeed_buf_size *= inc->sample_unit_size;
inc->datafeed_buffer = g_malloc(inc->datafeed_buf_size);
inc->datafeed_buf_fill = 0;
#define LOG_PREFIX "input/trace32_ad"
-#define OUTBUF_FLUSH_SIZE 10240
+#define CHUNK_SIZE 10240
#define MAX_POD_COUNT 12
#define HEADER_SIZE 80
return SR_ERR;
}
- inc->out_buf = g_string_sized_new(OUTBUF_FLUSH_SIZE);
+ inc->out_buf = g_string_sized_new(CHUNK_SIZE);
return SR_OK;
}
g_string_append_len(inc->out_buf, single_payload, payload_len);
}
- if (inc->out_buf->len >= OUTBUF_FLUSH_SIZE)
+ if (inc->out_buf->len >= CHUNK_SIZE)
flush_output_buffer(in);
}
g_string_append_len(inc->out_buf, single_payload, payload_len);
}
- if (inc->out_buf->len >= OUTBUF_FLUSH_SIZE)
+ if (inc->out_buf->len >= CHUNK_SIZE)
flush_output_buffer(in);
}
#define LOG_PREFIX "input/vcd"
-#define CHUNKSIZE (1024 * 1024)
+#define CHUNK_SIZE (1024 * 1024)
struct context {
gboolean started;
uint8_t *p;
inc = in->priv;
- samples_per_chunk = CHUNKSIZE / inc->bytes_per_sample;
+ samples_per_chunk = CHUNK_SIZE / inc->bytes_per_sample;
while (count) {
space_left = samples_per_chunk - inc->samples_in_buffer;
in->sdi = g_malloc0(sizeof(struct sr_dev_inst));
in->priv = inc;
- inc->buffer = g_malloc(CHUNKSIZE);
+ inc->buffer = g_malloc(CHUNK_SIZE);
return SR_OK;
}