X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fscpi%2Fscpi.c;h=48e6a48495c9bfaba591147a12f715b67fe0b493;hp=00f4ef805eb45843dfaf502942235c040b7f0bc2;hb=b6be55ce95b8d4d00d64874a05c022846e43cec4;hpb=9a512113ca0cfb34e8a12c678573e3687590ab41 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. *