X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fmanson-hcs-3xxx%2Fapi.c;h=7bae92917e79b3334db9fac302412453df36263c;hb=c3cd66a00cdb4afbd43108563d979eebfbafaf69;hp=f22d733461001689c268ec485d1131439d7edd06;hpb=15f96409dc54fd2ef784c59156daedd9acfa78ed;p=libsigrok.git
diff --git a/src/hardware/manson-hcs-3xxx/api.c b/src/hardware/manson-hcs-3xxx/api.c
index f22d7334..7bae9291 100644
--- a/src/hardware/manson-hcs-3xxx/api.c
+++ b/src/hardware/manson-hcs-3xxx/api.c
@@ -15,14 +15,16 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see .
*/
-/** @file
- * Manson HCS-3xxx series power supply driver
- * @internal
- */
+/**
+ * @file
+ *
+ * Manson HCS-3xxx series power supply driver
+ *
+ * @internal
+ */
#include
#include "protocol.h"
@@ -231,13 +233,11 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
switch (key) {
case SR_CONF_LIMIT_MSEC:
+ case SR_CONF_LIMIT_SAMPLES:
return sr_sw_limits_config_set(&devc->limits, key, data);
case SR_CONF_VOLTAGE_TARGET:
dval = g_variant_get_double(data);
@@ -350,9 +350,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
struct dev_context *devc;
struct sr_serial_dev_inst *serial;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
sr_sw_limits_acquisition_start(&devc->limits);
@@ -369,12 +366,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
return SR_OK;
}
-static int dev_acquisition_stop(struct sr_dev_inst *sdi)
-{
- return std_serial_dev_acquisition_stop(sdi,
- std_serial_dev_close);
-}
-
static struct sr_dev_driver manson_hcs_3xxx_driver_info = {
.name = "manson-hcs-3xxx",
.longname = "Manson HCS-3xxx",
@@ -389,7 +380,7 @@ static struct sr_dev_driver manson_hcs_3xxx_driver_info = {
.dev_open = std_serial_dev_open,
.dev_close = std_serial_dev_close,
.dev_acquisition_start = dev_acquisition_start,
- .dev_acquisition_stop = dev_acquisition_stop,
+ .dev_acquisition_stop = std_serial_dev_acquisition_stop,
.context = NULL,
};
SR_REGISTER_DEV_DRIVER(manson_hcs_3xxx_driver_info);