#include <stdint.h>
#include <glib.h>
-#include "libsigrok.h"
+#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
#define LOG_PREFIX "atten-pps3xxx"
struct pps_model {
int modelid;
- char *name;
+ const char *name;
int channel_modes;
int num_channels;
struct channel_spec channels[MAX_CHANNELS];
gboolean output_enabled_set;
};
-/** Private, per-device-instance driver context. */
struct dev_context {
- /* Model-specific information */
- struct pps_model *model;
+ const struct pps_model *model;
- /* Acquisition state */
gboolean acquisition_running;
- /* Operational state */
gboolean config_dirty;
struct per_channel_config *config;
+ /* Blocking write timeout for packet. */
+ int delay_ms;
/* Received from device. */
int channel_mode;
gboolean over_current_protection;
int channel_mode_set;
gboolean over_current_protection_set;
- /* Temporary state across callbacks */
uint8_t packet[PACKET_SIZE];
int packet_size;