X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fasix-sigma%2Fapi.c;fp=src%2Fhardware%2Fasix-sigma%2Fapi.c;h=6469b69a2bc39cdfd7549ee725eb1d477e218d93;hb=de4c29fa9116fcd007b136ec550d81b40b3d3989;hp=b8d68e9a0118c433184ab7a68f0c4ae3277bcb5b;hpb=ea57157d0d2e17e418463cf8e4f25453e5b903d7;p=libsigrok.git diff --git a/src/hardware/asix-sigma/api.c b/src/hardware/asix-sigma/api.c index b8d68e9a..6469b69a 100644 --- a/src/hardware/asix-sigma/api.c +++ b/src/hardware/asix-sigma/api.c @@ -550,7 +550,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) * Derive a mask where bits are set for unavailable channels. * Either send the single byte, or the full byte sequence. */ - pindis_mask = ~BITS_MASK(devc->num_channels); + pindis_mask = ~BITS_MASK(devc->interp.num_channels); if (devc->clock.samplerate > SR_MHZ(50)) { ret = sigma_set_register(devc, WRITE_CLOCK_SELECT, pindis_mask & 0xff); @@ -608,7 +608,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) if (ret != SR_OK) return ret; - devc->state.state = SIGMA_CAPTURE; + devc->state = SIGMA_CAPTURE; return SR_OK; } @@ -626,10 +626,10 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi) * already. The detour is required to have sample data retrieved * for forced acquisition stops. */ - if (devc->state.state == SIGMA_CAPTURE) { - devc->state.state = SIGMA_STOPPING; + if (devc->state == SIGMA_CAPTURE) { + devc->state = SIGMA_STOPPING; } else { - devc->state.state = SIGMA_IDLE; + devc->state = SIGMA_IDLE; (void)sr_session_source_remove(sdi->session, -1); }