X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fhardware%2Farachnid-labs-re-load-pro%2Fprotocol.h;h=fca1b9782cb98c354b61cb7b378257a87531237b;hb=69b05583955761d24c86cf1f46c1d1dba8c6176c;hp=35a7a5be267012cedde72ee58a6e1331898ac964;hpb=2217be1dd452ec00ac3c59e2db60f6b088593761;p=libsigrok.git
diff --git a/src/hardware/arachnid-labs-re-load-pro/protocol.h b/src/hardware/arachnid-labs-re-load-pro/protocol.h
index 35a7a5be..fca1b978 100644
--- a/src/hardware/arachnid-labs-re-load-pro/protocol.h
+++ b/src/hardware/arachnid-labs-re-load-pro/protocol.h
@@ -14,8 +14,7 @@
* 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 .
*/
#ifndef LIBSIGROK_HARDWARE_ARACHNID_LABS_RE_LOAD_PRO_PROTOCOL_H
@@ -26,27 +25,40 @@
#include
#include "libsigrok-internal.h"
-#define LOG_PREFIX "re-load-pro"
+#define LOG_PREFIX "arachnid-labs-re-load-pro"
#define RELOADPRO_BUFSIZE 100
-/** Private, per-device-instance driver context. */
struct dev_context {
- uint64_t limit_samples;
- uint64_t limit_msec;
- uint64_t num_samples;
- int64_t starttime;
- uint8_t buf[RELOADPRO_BUFSIZE];
+ struct sr_sw_limits limits;
+
+ char buf[RELOADPRO_BUFSIZE];
int buflen;
+
+ float current_limit;
+ float voltage;
+ float current;
gboolean otp_active;
gboolean uvc_active;
+ float uvc_threshold;
+
+ gboolean acquisition_running;
+ GMutex acquisition_mutex;
+
+ GCond current_limit_cond;
+ GCond voltage_cond;
+ GCond uvc_threshold_cond;
};
SR_PRIV int reloadpro_set_current_limit(const struct sr_dev_inst *sdi,
float current);
SR_PRIV int reloadpro_set_on_off(const struct sr_dev_inst *sdi, gboolean on);
+SR_PRIV int reloadpro_set_under_voltage_threshold(const struct sr_dev_inst *sdi,
+ float uvc_threshold);
SR_PRIV int reloadpro_get_current_limit(const struct sr_dev_inst *sdi,
- float *current);
+ float *current_limit);
+SR_PRIV int reloadpro_get_under_voltage_threshold(const struct sr_dev_inst *sdi,
+ float *uvc_threshold);
SR_PRIV int reloadpro_get_voltage_current(const struct sr_dev_inst *sdi,
float *voltage, float *current);
SR_PRIV int reloadpro_receive_data(int fd, int revents, void *cb_data);