]> sigrok.org Git - libsigrok.git/blobdiff - hardware/link-mso19/protocol.h
Added limit samples Eveything seems to work find up to 1024 samples
[libsigrok.git] / hardware / link-mso19 / protocol.h
index 9ce1de3b883ed617421b69e62a0e90af50d7ff28..773123938067745e7941550e5de23cefdd0013ec 100644 (file)
@@ -40,7 +40,7 @@
 
 #define NUM_PROBES             8
 #define NUM_TRIGGER_STAGES     4
-#define TRIGGER_TYPES          "01"
+#define TRIGGER_TYPES          "01" //the first r/f is used for the whole group
 #define SERIALCOMM "460800/8n1/flow=2" 
 #define SERIALCONN "/dev/ttyUSB0" 
 #define CLOCK_RATE             SR_MHZ(100)
 #define MSO_TRIGGER_FIRED      '5'
 #define MSO_TRIGGER_DATAREADY  '6'
 
+enum trigger_slopes {
+  SLOPE_POSITIVE = 0, 
+  SLOPE_NEGATIVE,
+};
+
 /* Structure for the pattern generator state */
 struct mso_patgen {
        /* Pattern generator clock config */
@@ -95,6 +100,8 @@ struct dev_context {
        double vbit;
        uint16_t dac_offset;
        uint16_t offset_range;
+  uint64_t limit_samples;
+  uint64_t num_samples;
        /* register cache */
        uint8_t ctlbase1;
        uint8_t ctlbase2;
@@ -102,10 +109,12 @@ struct dev_context {
        uint8_t la_threshold;
        uint64_t cur_rate;
        uint8_t dso_probe_attn;
+  int8_t  use_trigger;
        uint8_t trigger_chan;
        uint8_t trigger_slope;
        uint8_t trigger_outsrc;
        uint8_t trigger_state;
+       uint8_t trigger_holdoff[2];
        uint8_t la_trigger;
        uint8_t la_trigger_mask;
        double dso_trigger_voltage;
@@ -133,6 +142,7 @@ SR_PRIV inline uint16_t mso_calc_raw_from_mv(struct dev_context *devc);
 SR_PRIV int mso_reset_fsm(struct sr_dev_inst *sdi);
 SR_PRIV int mso_toggle_led(struct sr_dev_inst *sdi, int state);
 
+SR_PRIV int mso_configure_probes(const struct sr_dev_inst *sdi);
 SR_PRIV void stop_acquisition(const struct sr_dev_inst *sdi);
 
 ///////////////////////