struct sr_device_instance *sdi = user_data;
struct alsa *alsa = sdi->priv;
struct sr_datafeed_packet packet;
- struct analog_sample *sample;
- unsigned int sample_size = sizeof(struct analog_sample) +
- (NUM_PROBES * sizeof(struct analog_probe));
+ struct sr_analog_sample *sample;
+ unsigned int sample_size = sizeof(struct sr_analog_sample) +
+ (NUM_PROBES * sizeof(struct sr_analog_probe));
char *outb;
char inb[4096];
int i, x, count;
return FALSE;
for (i = 0; i < count; i++) {
- sample = (struct analog_sample *)
+ sample = (struct sr_analog_sample *)
(outb + (i * sample_size));
sample->num_probes = NUM_PROBES;
uint8_t *linevalues;
char *header;
int mark_trigger;
-// struct analog_sample *prevsample;
+// struct sr_analog_sample *prevsample;
enum outputmode mode;
};
}
ctx->probelist[ctx->num_enabled_probes] = 0;
- ctx->unitsize = sizeof(struct analog_sample) +
- (ctx->num_enabled_probes * sizeof(struct analog_probe));
+ ctx->unitsize = sizeof(struct sr_analog_sample) +
+ (ctx->num_enabled_probes * sizeof(struct sr_analog_probe));
ctx->line_offset = 0;
ctx->spl_cnt = 0;
ctx->mark_trigger = -1;
struct context *ctx;
unsigned int outsize, offset, p;
int max_linelen;
- struct analog_sample *sample;
+ struct sr_analog_sample *sample;
char *outbuf, c;
ctx = o->internal;
if (length_in >= ctx->unitsize) {
for (offset = 0; offset <= length_in - ctx->unitsize;
offset += ctx->unitsize) {
- sample = (struct analog_sample *) (data_in + offset);
+ sample = (struct sr_analog_sample *) (data_in + offset);
for (p = 0; p < ctx->num_enabled_probes; p++) {
int val = sample->probes[p].val;
int res = sample->probes[p].res;
}
ctx->probelist[ctx->num_enabled_probes] = 0;
// ctx->unitsize = (ctx->num_enabled_probes + 7) / 8;
- ctx->unitsize = sizeof(struct analog_sample) +
- (ctx->num_enabled_probes * sizeof(struct analog_probe));
+ ctx->unitsize = sizeof(struct sr_analog_sample) +
+ (ctx->num_enabled_probes * sizeof(struct sr_analog_probe));
num_probes = g_slist_length(o->device->probes);
comment[0] = '\0';
// uint64_t sample;
static uint64_t samplecount = 0;
char *outbuf, *c;
- struct analog_sample *sample;
+ struct sr_analog_sample *sample;
ctx = o->internal;
// max_linelen = 16 + ctx->num_enabled_probes * 2;
for (i = 0; i <= length_in - ctx->unitsize; i += ctx->unitsize) {
// memcpy(&sample, data_in + i, ctx->unitsize);
- sample = (struct analog_sample *) (data_in + i);
+ sample = (struct sr_analog_sample *) (data_in + i);
/* The first column is a counter (needed for gnuplot). */
c = outbuf + strlen(outbuf);
session->analyzers = NULL;
}
-void sr_session_pa_add(struct analyzer *an)
+void sr_session_pa_add(struct sr_analyzer *an)
{
session->analyzers = g_slist_append(session->analyzers, an);
}
/* Protocol analyzers setup */
void sr_session_pa_clear(void);
-void sr_session_pa_add(struct analyzer *pa);
+void sr_session_pa_add(struct sr_analyzer *pa);
/* Datafeed setup */
void sr_session_datafeed_callback_clear(void);
};
/* (Unused) protocol decoder stack entry */
-struct protocol {
+struct sr_protocol {
char *name;
int id;
int stackindex;
int num_logic_probes;
};
-struct analog_probe {
+struct sr_analog_probe {
uint8_t att;
uint8_t res; /* Needs to be a power of 2, FIXME */
uint16_t val; /* Max hardware ADC width is 16bits */
};
-struct analog_sample {
+struct sr_analog_sample {
uint8_t num_probes; /* Max hardware probes is 256 */
- struct analog_probe probes[];
+ struct sr_analog_probe probes[];
};
struct sr_input {
uint64_t *length_out);
};
-struct analyzer {
+struct sr_analyzer {
char *name;
char *filename;
/*