]> sigrok.org Git - libsigrok.git/blobdiff - hardware/common/serial.c
Route sr_source_add for all serial devices through a serial_source_add wrapper.
[libsigrok.git] / hardware / common / serial.c
index e181f2338562386327bc1e18e71c8a44b2cf651b..a0de0de50b9f075494953eaf2b0621c503ee8099 100644 (file)
@@ -638,3 +638,9 @@ SR_PRIV int sr_serial_extract_options(GSList *options, const char **serial_devic
 
        return SR_OK;
 }
+
+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)
+{
+       return sr_source_add(serial->fd, events, timeout, cb, cb_data);
+}