]> sigrok.org Git - libsigrok.git/blobdiff - src/scpi/scpi_libgpib.c
scpi: Rephrase buffer resize for free space during SCPI read, add comments
[libsigrok.git] / src / scpi / scpi_libgpib.c
index ed499cca5bad7bacd0e1e1fa07b70fc4ab7041a9..cab72df720f426bfcfc9f7f19909bb9862da7e03 100644 (file)
@@ -139,6 +139,9 @@ static int scpi_gpib_close(struct sr_scpi_dev_inst *scpi)
 {
        struct scpi_gpib *gscpi = scpi->priv;
 
+       /* Put device in back local mode to prevent lock-out of front panel. */
+       ibloc(gscpi->descriptor);
+       /* Now it's safe to close the handle. */
        ibonl(gscpi->descriptor, 0);
 
        return SR_OK;