]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/korad-kaxxxxp/protocol.h
Add support for TENMA 72-2710 V6.6 power supply
[libsigrok.git] / src / hardware / korad-kaxxxxp / protocol.h
index f2f135707f156fa6088b1fd7ee34267d20866073..315961b1ebbba5855c7ba430a257c6ad1fbf7f2c 100644 (file)
@@ -2,7 +2,7 @@
  * This file is part of the libsigrok project.
  *
  * Copyright (C) 2015 Hannu Vuolasaho <vuokkosetae@gmail.com>
- * Copyright (C) 2018 Frank Stettner <frank-stettner@gmx.net>
+ * Copyright (C) 2018-2019 Frank Stettner <frank-stettner@gmx.net>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -37,12 +37,20 @@ enum {
        KORAD_KA3005P,
        KORAD_KA3005P_0X01,
        KORAD_KA3005P_0XBC,
+       KORAD_KA3005P_V42,
+       KORAD_KA3005P_V55,
        KORAD_KD3005P,
        KORAD_KD3005P_V20_NOSP,
+       KORAD_KD3005P_V21_NOSP,
+       RND_320_KD3005P,
+       RND_320_KA3005P,
        RND_320K30PV,
+       TENMA_72_2550_V2,
        TENMA_72_2540_V20,
        TENMA_72_2540_V21,
+       TENMA_72_2540_V52,
        TENMA_72_2535_V21,
+       TENMA_72_2710_V66,
        STAMOS_SLS31_V20,
        KORAD_KD6005P,
        /* Support for future devices with this protocol. */
@@ -92,6 +100,12 @@ struct dev_context {
        gboolean ocp_enabled;    /**< Output current protection enabled. */
        gboolean ovp_enabled;    /**< Output voltage protection enabled. */
 
+       gboolean cc_mode_1_changed;      /**< CC mode of channel 1 has changed. */
+       gboolean cc_mode_2_changed;      /**< CC mode of channel 2 has changed. */
+       gboolean output_enabled_changed; /**< Output enabled state has changed. */
+       gboolean ocp_enabled_changed;    /**< OCP enabled state has changed. */
+       gboolean ovp_enabled_changed;    /**< OVP enabled state has changed. */
+
        int acquisition_target;  /**< What reply to expect. */
        int program;             /**< Program to store or recall. */
 
@@ -106,7 +120,7 @@ struct dev_context {
 SR_PRIV int korad_kaxxxxp_send_cmd(struct sr_serial_dev_inst *serial,
                                        const char *cmd);
 SR_PRIV int korad_kaxxxxp_read_chars(struct sr_serial_dev_inst *serial,
-                                       int count, char *buf);
+                                       size_t count, char *buf);
 SR_PRIV int korad_kaxxxxp_set_value(struct sr_serial_dev_inst *serial,
                                        int target, struct dev_context *devc);
 SR_PRIV int korad_kaxxxxp_get_value(struct sr_serial_dev_inst *serial,