X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fasix-sigma%2Fasix-sigma.c;h=d1bca4ef5bab95576357f2feeba3c7dad02c4f1f;hb=2eb1612d463e9232af437d9a6c1b3897da2367e9;hp=8965f685de961992c83d18d5cf2bdbac55647d7b;hpb=af945a6625474e039fb7730483c5d07aa7f45969;p=libsigrok.git diff --git a/src/hardware/asix-sigma/asix-sigma.c b/src/hardware/asix-sigma/asix-sigma.c index 8965f685..d1bca4ef 100644 --- a/src/hardware/asix-sigma/asix-sigma.c +++ b/src/hardware/asix-sigma/asix-sigma.c @@ -201,10 +201,10 @@ static int sigma_read_pos(uint32_t *stoppos, uint32_t *triggerpos, /* Not really sure why this must be done, but according to spec. */ if ((--*stoppos & 0x1ff) == 0x1ff) - stoppos -= 64; + *stoppos -= 64; if ((*--triggerpos & 0x1ff) == 0x1ff) - triggerpos -= 64; + *triggerpos -= 64; return 1; } @@ -377,7 +377,7 @@ static GSList *scan(GSList *options) devc->use_triggers = 0; /* Register SIGMA device. */ - if (!(sdi = sr_dev_inst_new(0, SR_ST_INITIALIZING, USB_VENDOR_NAME, + if (!(sdi = sr_dev_inst_new(SR_ST_INITIALIZING, USB_VENDOR_NAME, USB_MODEL_NAME, NULL))) { sr_err("%s: sdi was NULL", __func__); goto free; @@ -1342,6 +1342,7 @@ static void add_trigger_function(enum triggerop oper, enum triggerfunc func, aset = (*mask >> i) & 1; bset = x[b][a]; + rset = 0; if (func == FUNC_AND || func == FUNC_NAND) rset = aset & bset; else if (func == FUNC_OR || func == FUNC_NOR)