X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fcenter-3xx%2Fprotocol.h;h=a5a3df43a7da407047cf0a282baad2685ee1fe04;hb=0150fdca549411e2d5111629c786e4e53c6208cc;hp=71e2630df238a327b20726f22e544d1b33f84293;hpb=155b680da482cea2381becb73c51cfb838bff31e;p=libsigrok.git diff --git a/src/hardware/center-3xx/protocol.h b/src/hardware/center-3xx/protocol.h index 71e2630d..a5a3df43 100644 --- a/src/hardware/center-3xx/protocol.h +++ b/src/hardware/center-3xx/protocol.h @@ -26,23 +26,20 @@ #include #include #include -#include "libsigrok.h" +#include #include "libsigrok-internal.h" #define LOG_PREFIX "center-3xx" -/* Note: When adding entries here, don't forget to update CENTER_DEV_COUNT. */ enum { CENTER_309, VOLTCRAFT_K204, }; -#define CENTER_DEV_COUNT 2 - struct center_dev_info { - char *vendor; - char *device; - char *conn; + const char *vendor; + const char *device; + const char *conn; int num_channels; uint32_t max_sample_points; uint8_t packet_size; @@ -51,25 +48,13 @@ struct center_dev_info { int (*receive_data)(int, int, void *); }; -extern SR_PRIV const struct center_dev_info center_devs[CENTER_DEV_COUNT]; +extern SR_PRIV const struct center_dev_info center_devs[]; #define SERIAL_BUFSIZE 256 /** Private, per-device-instance driver context. */ struct dev_context { - /** The current sampling limit (in number of samples). */ - uint64_t limit_samples; - - /** The current sampling limit (in ms). */ - uint64_t limit_msec; - - /** Opaque pointer passed in by the frontend. */ - void *cb_data; - - /** The current number of already received samples. */ - uint64_t num_samples; - - int64_t starttime; + struct sr_sw_limits sw_limits; uint8_t buf[SERIAL_BUFSIZE]; int bufoffset;