X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fscpi%2Fscpi.c;h=48e6a48495c9bfaba591147a12f715b67fe0b493;hb=379e95c587e1d76eb5d6d1a144b938e6a4916b1f;hp=00f4ef805eb45843dfaf502942235c040b7f0bc2;hpb=815685462fdab21a390b5aecc253b92753439f06;p=libsigrok.git diff --git a/src/scpi/scpi.c b/src/scpi/scpi.c index 00f4ef80..48e6a484 100644 --- a/src/scpi/scpi.c +++ b/src/scpi/scpi.c @@ -337,6 +337,21 @@ SR_PRIV int sr_scpi_read_data(struct sr_scpi_dev_inst *scpi, return scpi->read_data(scpi->priv, buf, maxlen); } +/** + * Send data to SCPI device. + * + * @param scpi Previously initialised SCPI device structure. + * @param buf Buffer with data to send. + * @param len Number of bytes to send. + * + * @return Number of bytes read, or SR_ERR upon failure. + */ +SR_PRIV int sr_scpi_write_data(struct sr_scpi_dev_inst *scpi, + char *buf, int maxlen) +{ + return scpi->write_data(scpi->priv, buf, maxlen); +} + /** * Check whether a complete SCPI response has been received. *