static struct sr_dev_driver yokogawa_dlm_driver_info;
static const char *MANUFACTURER_ID = "YOKOGAWA";
-static const char *MANUFACTURER_NAME = "Yokogawa";
static const uint32_t scanopts[] = {
SR_CONF_CONN,
goto fail;
sdi = g_malloc0(sizeof(struct sr_dev_inst));
- sdi->vendor = g_strdup(MANUFACTURER_NAME);
+ sdi->vendor = g_strdup("Yokogawa");
sdi->model = g_strdup(model_name);
sdi->version = g_strdup(hw_info->firmware_version);
return CG_INVALID;
}
-static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
- const struct sr_channel_group *cg)
+static int config_get(uint32_t key, GVariant **data,
+ const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
int ret, cg_type;
unsigned int i;
return ret;
}
-static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
- const struct sr_channel_group *cg)
+static int config_set(uint32_t key, GVariant *data,
+ const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
int ret, cg_type;
unsigned int i, j;
}
static int config_channel_set(const struct sr_dev_inst *sdi,
- struct sr_channel *ch, unsigned int changes)
+ struct sr_channel *ch, unsigned int changes)
{
/* Currently we only handle SR_CHANNEL_SET_ENABLED. */
if (changes != SR_CHANNEL_SET_ENABLED)
return dlm_channel_state_set(sdi, ch->index, ch->enabled);
}
-static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
- const struct sr_channel_group *cg)
+static int config_list(uint32_t key, GVariant **data,
+ const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
int cg_type = CG_NONE;
struct dev_context *devc;
case SR_CONF_DEVICE_OPTIONS:
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
case SR_CONF_TIMEBASE:
- *data = std_gvar_tuple_array(&dlm_timebases, ARRAY_SIZE(dlm_timebases));
+ *data = std_gvar_tuple_array(ARRAY_AND_SIZE(dlm_timebases));
return SR_OK;
case SR_CONF_TRIGGER_SOURCE:
if (!model)
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
if (cg_type == CG_ANALOG)
- *data = std_gvar_array_u32(devopts_cg_analog, ARRAY_SIZE(devopts_cg_analog));
+ *data = std_gvar_array_u32(ARRAY_AND_SIZE(devopts_cg_analog));
else if (cg_type == CG_DIGITAL)
- *data = std_gvar_array_u32(devopts_cg_digital, ARRAY_SIZE(devopts_cg_digital));
+ *data = std_gvar_array_u32(ARRAY_AND_SIZE(devopts_cg_digital));
else
*data = std_gvar_array_u32(NULL, 0);
break;
case SR_CONF_VDIV:
if (cg_type == CG_NONE)
return SR_ERR_CHANNEL_GROUP;
- *data = std_gvar_tuple_array(&dlm_vdivs, ARRAY_SIZE(dlm_vdivs));
+ *data = std_gvar_tuple_array(ARRAY_AND_SIZE(dlm_vdivs));
break;
default:
return SR_ERR_NA;