* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <libudev.h>
#include <sigrok.h>
#include <arpa/inet.h>
+#include <sigrok-internal.h>
#include "config.h"
#include "link-mso19.h"
w = 0;
while (w < s) {
- ret = write(fd, buf + w, s - w);
+ ret = serial_write(fd, buf + w, s - w);
if (ret < 0) {
ret = SIGROK_ERR;
goto free;
return ret;
buf[0] = 0;
- if (read(sdi->serial->fd, buf, 1) != 1) /* FIXME: Need timeout */
+ if (serial_read(sdi->serial->fd, buf, 1) != 1) /* FIXME: Need timeout */
ret = SIGROK_ERR;
*info = buf[0];
revents = revents;
- s = read(fd, in, sizeof(in));
+ s = serial_read(fd, in, sizeof(in));
if (s <= 0)
return FALSE;