packet.payload = &analog;
/* TODO: support for 5xxx series 9-bit samples */
analog.num_samples = transfer->actual_length / 2;
+ analog.unit = SR_UNIT_VOLTAGE;
analog.data = g_try_malloc(analog.num_samples * sizeof(float) * num_probes);
data_offset = 0;
for (i = 0; i < analog.num_samples; i++) {
SR_DF_FRAME_END,
};
+/* sr_datafeed_analog.unit values */
+enum {
+ SR_UNIT_VOLTAGE,
+ SR_UNIT_CURRENT,
+};
+
struct sr_datafeed_packet {
uint16_t type;
void *payload;
struct sr_datafeed_analog {
int num_samples;
+ int unit;
float *data;
};