+SR_PRIV int lps_read_reply(struct sr_serial_dev_inst *serial, char **buf, int *buflen);
+SR_PRIV int lps_send_va(struct sr_serial_dev_inst *serial, const char* fmt, va_list args);
+SR_PRIV int lps_cmd_ok(struct sr_serial_dev_inst *serial, const char* fmt, ...);
+SR_PRIV int lps_cmd_reply(char* reply, struct sr_serial_dev_inst *serial, const char* fmt, ...);
+SR_PRIV int lps_query_status(struct sr_dev_inst* sdi);
+
+/* Serial communication parameters */
+#define SERIALCOMM "2400/8n1/dtr=1/rts=1/flow=0"
+
+#define VENDOR_MOTECH "Motech"
+
+/** Driver scanning options. */
+static const int32_t hwopts[] = {
+ SR_CONF_CONN,
+ SR_CONF_SERIALCOMM,
+};
+
+/** Hardware capabilities generic. */
+static const int32_t hwcaps[] = {
+ /* Device class */
+ SR_CONF_POWER_SUPPLY,
+ /* Aquisition modes. */
+ SR_CONF_LIMIT_SAMPLES,
+ SR_CONF_LIMIT_MSEC,
+ SR_CONF_CONTINUOUS,
+ /* Device configuration */
+ SR_CONF_OUTPUT_CHANNEL,
+};
+
+/** Hardware capabilities channel 1, 2. */
+static const int32_t hwcaps_ch12[] = {
+ SR_CONF_OUTPUT_VOLTAGE,
+ SR_CONF_OUTPUT_VOLTAGE_MAX,
+ SR_CONF_OUTPUT_CURRENT,
+ SR_CONF_OUTPUT_CURRENT_MAX,
+ SR_CONF_OUTPUT_ENABLED,
+};
+
+/** Hardware capabilities channel 3. (LPS-304/305 only). */
+static const int32_t hwcaps_ch3[] = {
+ SR_CONF_OUTPUT_VOLTAGE,
+ SR_CONF_OUTPUT_ENABLED,
+};
+
+static const char *channel_modes[] = {
+ "Independent",
+ "Track1",
+ "Track2",
+};
+
+static struct lps_modelspec models[] = {
+ { LPS_UNKNOWN, "Dummy", 0,
+ {
+
+ }
+ },
+ { LPS_301, "LPS-301", 1,
+ {
+ /* Channel 1 */
+ { { 0, 32, 0.01 }, { 0.005, 2, 0.001 } },
+ },
+ },
+ { LPS_302, "LPS-302", 1,
+ {
+ /* Channel 1 */
+ { { 0, 32, 0.01 }, { 0.005, 3, 0.001 } },
+ },
+ },
+ { LPS_303, "LPS-303", 1,
+ {
+ /* Channel 1 */
+ { { 0, 32, 0.01 }, { 0.005, 3, 0.001 } },
+ },
+ },
+ { LPS_304, "LPS-304", 3,
+ {
+ /* Channel 1 */
+ { { 0, 32, 0.01 }, { 0.005, 3, 0.001 } },
+ /* Channel 2 */
+ { { 0, 32, 0.01 }, { 0.005, 3, 0.001 } },
+ /* Channel 3 */
+ { { 5, 5, 0.0 }, { 0.005, 3, 0.001 } },
+ },
+ },
+ { LPS_305, "LPS-305", 3,
+ {
+ /* Channel 1 */
+ { { 0, 32, 0.01 }, { 0.005, 3, 0.001 } },
+ /* Channel 2 */
+ { { 0, 32, 0.01 }, { 0.005, 3, 0.001 } },
+ /* Channel 3 */
+ { { 3.3, 5, 1.7 }, { 0.005, 3, 0.001 } },
+ },
+ },
+};