* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file
- * <em>Motech LPS-30x series</em> power supply driver
- * @internal
- */
-
#ifndef LIBSIGROK_HARDWARE_MOTECH_LPS_30X_PROTOCOL_H
#define LIBSIGROK_HARDWARE_MOTECH_LPS_30X_PROTOCOL_H
#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
+#define LOG_PREFIX "motech-lps-30x"
+
SR_PRIV int lps_process_status(struct sr_dev_inst *sdi, int stat);
SR_PRIV int lps_send_req(struct sr_serial_dev_inst *serial, const char *fmt, ...);
-#define LOG_PREFIX "motech-lps-30x"
-
#define LINELEN_MAX 50 /**< Max. line length for requests */
#define REQ_TIMEOUT_MS 250 /**< Timeout [ms] for single request. */
gdouble output_current_max;
};
-/** Private, per-device-instance driver context. */
struct dev_context {
- /* Model-specific information */
const struct lps_modelspec *model;
- /* Acquisition status */
gboolean acq_running; /**< Acquisition is running. */
struct sr_sw_limits limits;
acquisition_req acq_req; /**< Current request. */
uint8_t acq_req_pending; /**< Request pending. 0=none, 1=reply, 2=OK */
- /* Operational state */
struct channel_status channel_status[MAX_CHANNELS];
guint8 tracking_mode; /**< 0=off, 1=Tracking from CH1, 2=Tracking from CH2. */
- /* Temporary state across callbacks */
int64_t req_sent_at; /**< Request sent. */
gchar buf[LINELEN_MAX]; /**< Buffer for read callback */
int buflen; /**< Data len in buf */