]> sigrok.org Git - libsigrok.git/blobdiff - hardware/tekpower-dmm/api.c
serial: Use OS-independent flags for serial port opening.
[libsigrok.git] / hardware / tekpower-dmm / api.c
index 97c705a0c8088481905afdd9fea659f570feaaf5..dd53f4dd3d64b017fc4ac823f66c1799521ea0eb 100644 (file)
@@ -106,7 +106,7 @@ static GSList *lcd14_scan(const char *conn, const char *serialcomm)
        if (!(serial = sr_serial_dev_inst_new(conn, serialcomm)))
                return NULL;
 
-       if (serial_open(serial, O_RDONLY | O_NONBLOCK) != SR_OK)
+       if (serial_open(serial, SERIAL_RDONLY | SERIAL_NONBLOCK) != SR_OK)
                return NULL;
 
        sr_info("Probing port %s readonly.", conn);
@@ -217,7 +217,7 @@ static int hw_dev_open(struct sr_dev_inst *sdi)
                return SR_ERR_BUG;
        }
 
-       if (serial_open(devc->serial, O_RDONLY) != SR_OK)
+       if (serial_open(devc->serial, SERIAL_RDONLY) != SR_OK)
                return SR_ERR;
 
        sdi->status = SR_ST_ACTIVE;