X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fatten-pps3xxx%2Fprotocol.h;h=f9409c2d1f7c01dcf61533fe3454a74c2b09809d;hb=5089a14345442bb87d0970efc0bc10235a530d60;hp=1441305d9730c0d28552f0147615c3b63c6c041a;hpb=155b680da482cea2381becb73c51cfb838bff31e;p=libsigrok.git diff --git a/src/hardware/atten-pps3xxx/protocol.h b/src/hardware/atten-pps3xxx/protocol.h index 1441305d..f9409c2d 100644 --- a/src/hardware/atten-pps3xxx/protocol.h +++ b/src/hardware/atten-pps3xxx/protocol.h @@ -22,7 +22,7 @@ #include #include -#include "libsigrok.h" +#include #include "libsigrok-internal.h" #define LOG_PREFIX "atten-pps3xxx" @@ -54,7 +54,7 @@ struct channel_spec { struct pps_model { int modelid; - char *name; + const char *name; int channel_modes; int num_channels; struct channel_spec channels[MAX_CHANNELS]; @@ -71,17 +71,15 @@ struct per_channel_config { 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; @@ -89,7 +87,6 @@ struct dev_context { int channel_mode_set; gboolean over_current_protection_set; - /* Temporary state across callbacks */ uint8_t packet[PACKET_SIZE]; int packet_size;