X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fhardware%2Fhp-3457a%2Fprotocol.c;h=f0197290f3b6d0e4825194335309d8a1a0df8d42;hb=048250d0e0a4cefdf192dbdb0e7f4dec3a881ed1;hp=d9aa83383ac6ac3a492b8ad4d68ebcd995bc902a;hpb=9a093be9f5df5e058e7f4f0c6fcc9ed013f803a2;p=libsigrok.git diff --git a/src/hardware/hp-3457a/protocol.c b/src/hardware/hp-3457a/protocol.c index d9aa8338..f0197290 100644 --- a/src/hardware/hp-3457a/protocol.c +++ b/src/hardware/hp-3457a/protocol.c @@ -25,6 +25,7 @@ static int set_mq_volt(struct sr_scpi_dev_inst *scpi, enum sr_mqflag flags); static int set_mq_amp(struct sr_scpi_dev_inst *scpi, enum sr_mqflag flags); static int set_mq_ohm(struct sr_scpi_dev_inst *scpi, enum sr_mqflag flags); + /* * The source for the frequency measurement can be either AC voltage, AC+DC * voltage, AC current, or AC+DC current. Configuring this is not yet @@ -67,7 +68,7 @@ static const struct rear_card_info rear_card_parameters[] = { }; static int send_mq_ac_dc(struct sr_scpi_dev_inst *scpi, const char *mode, - enum sr_mqflag flags) + enum sr_mqflag flags) { const char *ac_flag, *dc_flag; @@ -388,7 +389,7 @@ SR_PRIV int hp_3457a_receive_data(int fd, int revents, void *cb_data) struct sr_scpi_dev_inst *scpi; struct dev_context *devc; struct channel_context *chanc; - struct sr_dev_inst *sdi = cb_data; + struct sr_dev_inst *sdi; (void)fd; (void)revents; @@ -435,7 +436,7 @@ SR_PRIV int hp_3457a_receive_data(int fd, int revents, void *cb_data) ret = sr_scpi_get_double(scpi, NULL, &devc->last_channel_sync); if (ret != SR_OK) { sr_err("Cannot check channel synchronization."); - sdi->driver->dev_acquisition_stop(sdi, cb_data); + sr_dev_acquisition_stop(sdi); return FALSE; } devc->acq_state = ACQ_GOT_CHANNEL_SYNC; @@ -456,7 +457,7 @@ SR_PRIV int hp_3457a_receive_data(int fd, int revents, void *cb_data) sr_err("Expected channel %u, but device says %u", chanc->index, (unsigned int)devc->last_channel_sync); - sdi->driver->dev_acquisition_stop(sdi, cb_data); + sr_dev_acquisition_stop(sdi); return FALSE; } /* All is good. Back to business. */ @@ -464,7 +465,7 @@ SR_PRIV int hp_3457a_receive_data(int fd, int revents, void *cb_data) } if (devc->limit_samples && (devc->num_samples >= devc->limit_samples)) { - sdi->driver->dev_acquisition_stop(sdi, cb_data); + sr_dev_acquisition_stop(sdi); return FALSE; }