]> sigrok.org Git - libsigrok.git/blobdiff - libsigrok-internal.h
Remove now-unused fd field from struct sr_serial_dev_inst.
[libsigrok.git] / libsigrok-internal.h
index d48e13f00de7b89612cc2cd56efcecfdd1ee1ea1..5e0556e3c78e37238dd0eb8846d704ebc3784291 100644 (file)
@@ -74,7 +74,6 @@ struct sr_usb_dev_inst {
 struct sr_serial_dev_inst {
        char *port;
        char *serialcomm;
-       int fd;
        int nonblocking;
        struct sp_port *data;
 };
@@ -190,6 +189,7 @@ SR_PRIV int std_session_send_df_header(const struct sr_dev_inst *sdi,
                const char *prefix);
 SR_PRIV int std_dev_clear(const struct sr_dev_driver *driver,
                std_dev_clear_t clear_private);
+SR_PRIV int std_serial_dev_close(struct sr_dev_inst *sdi);
 
 /*--- strutil.c -------------------------------------------------------------*/
 
@@ -228,6 +228,9 @@ SR_PRIV int serial_stream_detect(struct sr_serial_dev_inst *serial,
                                 uint64_t timeout_ms, int baudrate);
 SR_PRIV int sr_serial_extract_options(GSList *options, const char **serial_device,
                                      const char **serial_options);
+SR_PRIV int serial_source_add(struct sr_serial_dev_inst *serial, int events,
+               int timeout, sr_receive_data_callback_t cb, void *cb_data);
+SR_PRIV int serial_source_remove(struct sr_serial_dev_inst *serial);
 #endif
 
 /*--- hardware/common/ezusb.c -----------------------------------------------*/
@@ -301,7 +304,9 @@ SR_PRIV int sr_scpi_source_add(struct sr_scpi_dev_inst *scpi, int events,
                int timeout, sr_receive_data_callback_t cb, void *cb_data);
 SR_PRIV int sr_scpi_source_remove(struct sr_scpi_dev_inst *scpi);
 SR_PRIV int sr_scpi_send(struct sr_scpi_dev_inst *scpi,
-                       const char *command);
+               const char *format, ...);
+SR_PRIV int sr_scpi_send_variadic(struct sr_scpi_dev_inst *scpi,
+               const char *format, va_list args);
 SR_PRIV int sr_scpi_receive(struct sr_scpi_dev_inst *scpi,
                        char **scpi_response);
 SR_PRIV int sr_scpi_read(struct sr_scpi_dev_inst *scpi, char *buf, int maxlen);
@@ -334,6 +339,11 @@ SR_PRIV struct sr_scpi_dev_inst *scpi_serial_dev_inst_new(const char *port,
                        const char *serialcomm);
 #endif
 
+/*--- hardware/common/scpi_tcp.c --------------------------------------------*/
+
+SR_PRIV struct sr_scpi_dev_inst *scpi_tcp_dev_inst_new(const char *address,
+                       const char *port);
+
 /*--- hardware/common/scpi_usbtmc.c -----------------------------------------*/
 
 SR_PRIV struct sr_scpi_dev_inst *scpi_usbtmc_dev_inst_new(const char *device);