*/
#include "protocol.h"
+#include <libserialport.h>
#define SERIALCOMM "115200/8n1"
/* Wait 10ms for a response. */
g_usleep(10000);
- probefd.fd = serial->fd;
+ sp_get_port_handle(serial->data, &probefd.fd);
probefd.events = G_IO_IN;
g_poll(&probefd, 1, 1);
*/
#include "protocol.h"
+#include <libserialport.h>
extern SR_PRIV struct sr_dev_driver ols_driver_info;
static struct sr_dev_driver *di = &ols_driver_info;
int num_channels, offset, j;
unsigned int i;
unsigned char byte;
+ int serial_fd;
drvc = di->priv;
sdi = l->data;
devc = sdi->priv;
serial = sdi->conn;
- if (serial->fd == fd)
+ sp_get_port_handle(serial->data, &serial_fd);
+ if (serial_fd == fd)
break;
devc = NULL;
}