X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Ffx2lafw%2Fapi.c;h=49236511f2735576b3c005a71a3e88a0c6e5dd7c;hb=9740d9bf8c257e714d937602a10b8d81a7762d4e;hp=a3e67614f26271a8a8bbac19c59509d61b0940ee;hpb=9615eeb572be5db9e770c0e343f80ab212335e3f;p=libsigrok.git diff --git a/hardware/fx2lafw/api.c b/hardware/fx2lafw/api.c index a3e67614..49236511 100644 --- a/hardware/fx2lafw/api.c +++ b/hardware/fx2lafw/api.c @@ -96,6 +96,9 @@ static const char *channel_names[] = { static const int32_t soft_trigger_matches[] = { SR_TRIGGER_ZERO, SR_TRIGGER_ONE, + SR_TRIGGER_RISING, + SR_TRIGGER_FALLING, + SR_TRIGGER_EDGE, }; static const uint64_t samplerates[] = { @@ -513,6 +516,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) struct dev_context *devc; struct drv_context *drvc; struct sr_usb_dev_inst *usb; + struct sr_trigger *trigger; struct libusb_transfer *transfer; unsigned int i, timeout, num_transfers; int ret; @@ -531,10 +535,9 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) devc->acq_aborted = FALSE; devc->empty_transfer_count = 0; - if (sr_session_trigger_get()) { + if ((trigger = sr_session_trigger_get())) { + devc->stl = soft_trigger_logic_new(sdi, trigger); devc->trigger_fired = FALSE; - devc->cur_trigger_stage = 0; - devc->cur_trigger_step = 0; } else devc->trigger_fired = TRUE;