]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/motech-lps-30x/protocol.h
Remove some unneeded double-spaces.
[libsigrok.git] / src / hardware / motech-lps-30x / protocol.h
index 94eeb67e0fe37bf6c81de08fb34dd8d9c21e9cb4..cb74148f468dcf82c75871cef191747c8239f164 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-/** @file
- *  <em>Motech LPS-30x series</em> power supply driver
- *  @internal
+/**
+ * @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 <stdint.h>
 #include <glib.h>
-#include "libsigrok.h"
+#include <libsigrok/libsigrok.h>
 #include "libsigrok-internal.h"
 
-
-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, ...);
+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"
 
@@ -63,7 +64,7 @@ struct channel_spec {
 /** Model properties specification */
 struct lps_modelspec {
        lps_modelid modelid;
-       const charmodelstr;
+       const char *modelstr;
        uint8_t num_channels;
        struct channel_spec channels[3];
 };
@@ -81,7 +82,7 @@ typedef enum {
 /** Status of a single channel. */
 struct channel_status {
        /* Channel information (struct channel_info*). data (struct) owned by sdi, just a reference to address a single channel. */
-       GSListinfo;
+       GSList *info;
        /* Received from device. */
        gdouble output_voltage_last;
        gdouble output_current_last;
@@ -95,12 +96,11 @@ struct channel_status {
 /** Private, per-device-instance driver context. */
 struct dev_context {
        /* Model-specific information */
-       const struct lps_modelspecmodel;
+       const struct lps_modelspec *model;
 
        /* Acquisition status */
        gboolean acq_running;           /**< Acquisition is running. */
-       uint64_t limit_samples;         /**< Target number of samples */
-       uint64_t limit_msec;            /**< Target sampling time */
+       struct sr_sw_limits limits;
        acquisition_req acq_req;        /**< Current request. */
        uint8_t acq_req_pending;        /**< Request pending. 0=none, 1=reply, 2=OK */
 
@@ -110,8 +110,6 @@ struct dev_context {
 
        /* Temporary state across callbacks */
        int64_t req_sent_at;    /**< Request sent. */
-       uint64_t num_samples;   /**< Current #samples for limit_samples */
-       GTimer *elapsed_msec;   /**< Used for sampling with limit_msec  */
        gchar buf[LINELEN_MAX]; /**< Buffer for read callback */
        int buflen;             /**< Data len in buf */
 };