X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fagilent-dmm%2Fapi.c;h=7bafabc2cf6d33953c3d4a0162732ce7853d3aac;hb=ee1b6054d6d6a00698ddae421eae63019c452b6d;hp=6a34985f8096a153466e6fc074f6c4a1065dbaa6;hpb=695dc859c15ba4190f5c1aa2e1a6e2dc6a6e5845;p=libsigrok.git diff --git a/src/hardware/agilent-dmm/api.c b/src/hardware/agilent-dmm/api.c index 6a34985f..7bafabc2 100644 --- a/src/hardware/agilent-dmm/api.c +++ b/src/hardware/agilent-dmm/api.c @@ -37,7 +37,7 @@ static const uint32_t drvopts[] = { }; static const uint32_t devopts[] = { - SR_CONF_CONTINUOUS | SR_CONF_SET, + SR_CONF_CONTINUOUS, SR_CONF_LIMIT_SAMPLES | SR_CONF_SET, SR_CONF_LIMIT_MSEC | SR_CONF_SET, }; @@ -72,11 +72,6 @@ static const struct agdmm_profile supported_agdmm[] = { SR_PRIV struct sr_dev_driver agdmm_driver_info; -static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx) -{ - return std_init(sr_ctx, di, LOG_PREFIX); -} - static GSList *scan(struct sr_dev_driver *di, GSList *options) { struct sr_dev_inst *sdi; @@ -161,16 +156,6 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) return devices; } -static GSList *dev_list(const struct sr_dev_driver *di) -{ - return ((struct drv_context *)(di->context))->instances; -} - -static int cleanup(const struct sr_dev_driver *di) -{ - return std_dev_clear(di, NULL); -} - static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) { @@ -204,7 +189,6 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) { - (void)sdi; (void)cg; switch (key) { @@ -246,7 +230,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) static int dev_acquisition_stop(struct sr_dev_inst *sdi) { - return std_serial_dev_acquisition_stop(sdi, sdi, std_serial_dev_close, + return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, sdi->conn, LOG_PREFIX); } @@ -254,10 +238,10 @@ SR_PRIV struct sr_dev_driver agdmm_driver_info = { .name = "agilent-dmm", .longname = "Agilent U12xx series DMMs", .api_version = 1, - .init = init, - .cleanup = cleanup, + .init = std_init, + .cleanup = std_cleanup, .scan = scan, - .dev_list = dev_list, + .dev_list = std_dev_list, .dev_clear = NULL, .config_get = NULL, .config_set = config_set,