X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fasix-sigma%2Fasix-sigma.c;h=8ff2e159101a79386603f6e7c1a1a83895c3ccb7;hb=65faa197ae4c607c9c127af99af6c8e5b6acd7b3;hp=7ae16bc997c195b5d5e6bb4a7646649e4d68cff5;hpb=a873c5940cc6d2d8f54f2dfdac3a98c4a3d302ee;p=libsigrok.git diff --git a/hardware/asix-sigma/asix-sigma.c b/hardware/asix-sigma/asix-sigma.c index 7ae16bc9..8ff2e159 100644 --- a/hardware/asix-sigma/asix-sigma.c +++ b/hardware/asix-sigma/asix-sigma.c @@ -64,22 +64,8 @@ static const uint64_t supported_samplerates[] = { * (the cable has two additional GND pins, and a TI and TO pin) */ static const char *probe_names[NUM_PROBES + 1] = { - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "10", - "11", - "12", - "13", - "14", - "15", - "16", + "1", "2", "3", "4", "5", "6", "7", "8", + "9", "10", "11", "12", "13", "14", "15", "16", NULL, }; @@ -662,6 +648,8 @@ static int set_samplerate(const struct sr_dev_inst *sdi, uint64_t samplerate) int i, ret; struct dev_context *devc = sdi->priv; + ret = SR_OK; + for (i = 0; supported_samplerates[i]; i++) { if (supported_samplerates[i] == samplerate) break; @@ -1067,7 +1055,9 @@ static int receive_data(int fd, int revents, void *cb_data) else hw_dev_acquisition_stop(sdi, sdi); - } else if (devc->state.state == SIGMA_DOWNLOAD) { + } + + if (devc->state.state == SIGMA_DOWNLOAD) { if (devc->state.chunks_downloaded >= numchunks) { /* End of samples. */ packet.type = SR_DF_END; @@ -1290,7 +1280,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, struct sr_datafeed_meta_logic meta; struct clockselect_50 clockselect; int frac, triggerpin, ret; - uint8_t triggerselect; + uint8_t triggerselect = 0; struct triggerinout triggerinout_conf; struct triggerlut lut;