From: Gerhard Sittig Date: Tue, 21 Dec 2021 15:25:26 +0000 (+0100) Subject: hp-3478a: use symbolic name for status register bit field X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;h=d07ef6f786e423df25e1d7155df988fba9fb8669;p=libsigrok.git hp-3478a: use symbolic name for status register bit field The hp_3478a_receive_data() routine uses SPOLL to only communicate measurement data when they have become available. Use a symbolic name for the tested bitfield for consistency with other driver locations and for improved readability. --- diff --git a/src/hardware/hp-3478a/protocol.c b/src/hardware/hp-3478a/protocol.c index 2e9130b0..ed8878be 100644 --- a/src/hardware/hp-3478a/protocol.c +++ b/src/hardware/hp-3478a/protocol.c @@ -489,7 +489,7 @@ SR_PRIV int hp_3478a_receive_data(int fd, int revents, void *cb_data) */ if (sr_scpi_gpib_spoll(scpi, &status_register) != SR_OK) return FALSE; - if (!(((uint8_t)status_register) & 0x01)) + if (!(((uint8_t)status_register) & SRQ_BUS_AVAIL)) return TRUE; /* Get a reading from the DMM. */