X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Farachnid-labs-re-load-pro%2Fprotocol.h;fp=src%2Fhardware%2Farachnid-labs-re-load-pro%2Fprotocol.h;h=25ceff58d8317f026975730c5351af0891a8f490;hb=803db07a1af036a5da65581ddbac23b7f84a4388;hp=f5c137865d7a8e27f4b62f96648191f5a9523c23;hpb=6e8d31d4680a35a35c2605c90d3abcc559d70a56;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 f5c13786..25ceff58 100644 --- a/src/hardware/arachnid-labs-re-load-pro/protocol.h +++ b/src/hardware/arachnid-labs-re-load-pro/protocol.h @@ -1,7 +1,7 @@ /* * This file is part of the libsigrok project. * - * Copyright (C) 2015 Uwe Hermann + * Copyright (C) 2015-2016 Uwe Hermann * * 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 @@ -26,12 +26,27 @@ #include #include "libsigrok-internal.h" -#define LOG_PREFIX "arachnid-labs-re-load-pro" +#define LOG_PREFIX "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]; + int buflen; + gboolean otp_active; }; +SR_PRIV int reloadpro_set_current_limit(const struct sr_dev_inst *sdi, + float current); +SR_PRIV int reloadpro_get_current_limit(const struct sr_dev_inst *sdi, + float *current); +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); #endif