X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fsaleae-logic%2Fsaleae-logic.h;h=6a96d458b93f40cb2fc1e621b975182aeab390b1;hb=69cfcfc8f0f3f4358714d706268fc05aaa70ca23;hp=2855485eb98e426e244ce955aea84aafc73327e6;hpb=d68e2d1a21ac5c3f24d88b7689f98764e4d57c30;p=libsigrok.git diff --git a/hardware/saleae-logic/saleae-logic.h b/hardware/saleae-logic/saleae-logic.h index 2855485e..6a96d458 100644 --- a/hardware/saleae-logic/saleae-logic.h +++ b/hardware/saleae-logic/saleae-logic.h @@ -25,7 +25,6 @@ #define NUM_TRIGGER_STAGES 4 #define TRIGGER_TYPES "01" #define FIRMWARE FIRMWARE_DIR "/saleae-logic.fw" -#define GTV_TO_MSEC(gtv) (gtv.tv_sec * 1000 + gtv.tv_usec / 1000) /* delay in ms */ #define MAX_RENUM_DELAY 3000 @@ -48,13 +47,14 @@ struct fx2_profile { int num_probes; }; -struct fx2_device { +/* Private, per-device-instance driver context. */ +struct context { struct fx2_profile *profile; /* - * Since we can't keep track of a Saleae Logic device after upgrading the - * firmware (it re-enumerates into a different device address after the - * upgrade) this is like a global lock. No device will open until a proper - * delay after the last device was upgraded. + * Since we can't keep track of a Saleae Logic device after upgrading + * the firmware (it re-enumerates into a different device address + * after the upgrade) this is like a global lock. No device will open + * until a proper delay after the last device was upgraded. */ GTimeVal fw_updated; /* device/capture settings */ @@ -65,11 +65,14 @@ struct fx2_device { uint8_t trigger_value[NUM_TRIGGER_STAGES]; int trigger_stage; uint8_t trigger_buffer[NUM_TRIGGER_STAGES]; + int num_samples; + int submitted_transfers; + /* * opaque session data passed in by the frontend, will be passed back * on the session bus along with samples. */ - void *session_data; + void *session_dev_id; struct sr_usb_dev_inst *usb; };