#include <config.h>
#include "protocol.h"
-#define VENDOR_NAME "ZEROPLUS"
#define USB_INTERFACE 0
#define USB_CONFIGURATION 1
#define NUM_TRIGGER_STAGES 4
sdi = g_malloc0(sizeof(struct sr_dev_inst));
sdi->status = SR_ST_INACTIVE;
- sdi->vendor = g_strdup(VENDOR_NAME);
+ sdi->vendor = g_strdup("ZEROPLUS");
sdi->model = g_strdup(prof->model_name);
sdi->serial_num = g_strdup(serial_num);
sdi->connection_id = g_strdup(connection_id);
case SR_CONF_SAMPLERATE:
devc = sdi->priv;
if (devc->prof->max_sampling_freq == 100)
- *data = std_gvar_samplerates(samplerates_100, ARRAY_SIZE(samplerates_100));
+ *data = std_gvar_samplerates(ARRAY_AND_SIZE(samplerates_100));
else if (devc->prof->max_sampling_freq == 200)
- *data = std_gvar_samplerates(samplerates_200, ARRAY_SIZE(samplerates_200));
+ *data = std_gvar_samplerates(ARRAY_AND_SIZE(samplerates_200));
else {
sr_err("Internal error: Unknown max. samplerate: %d.",
devc->prof->max_sampling_freq);
}
break;
case SR_CONF_TRIGGER_MATCH:
- *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
- trigger_matches, ARRAY_SIZE(trigger_matches),
- sizeof(int32_t));
+ *data = std_gvar_array_i32(ARRAY_AND_SIZE(trigger_matches));
break;
case SR_CONF_VOLTAGE_THRESHOLD:
*data = std_gvar_min_max_step_thresholds(-6.0, 6.0, 0.1);