]> sigrok.org Git - libsigrok.git/commitdiff
hp-3478a: use symbolic name for status register bit field
authorGerhard Sittig <redacted>
Tue, 21 Dec 2021 15:25:26 +0000 (16:25 +0100)
committerGerhard Sittig <redacted>
Tue, 22 Feb 2022 22:56:46 +0000 (23:56 +0100)
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.

src/hardware/hp-3478a/protocol.c

index 2e9130b022a9ab01832701ebdae41eb0c1533c47..ed8878bec5a25c8560950713b0ba21caf942d740 100644 (file)
@@ -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. */