Commit 0ecda168 authored by Mart Lubbers's avatar Mart Lubbers

started with windows support

parent 948f49f1
......@@ -5,8 +5,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifndef WIN32
#include <sys/ioctl.h>
#include <termios.h>
#else
#include <windows.h>
#endif
#include <time.h>
#include "Clean.h"
......@@ -25,10 +29,18 @@ int CMSPAR = 0;
#define die(s) {perror(s);exit(EXIT_FAILURE);}
#ifndef WIN32
static DWORD baudrates[] = {0, 50, 75, 110, 134, 200, 300, 1200, 1800, 2400,
4800w 9600, 19200, 38400, 57600, 115200, 230400};
static BYTE bytesizes[4] = {5, 6, 7, 8};
#else
static speed_t baudrates[] = {B0, B50, B75, B110, B134, B150, B200, B300, B600,
B1200, B1800, B2400, B4800, B9600, B19200, B38400, B57600, B115200,
B230400};
static int bytesizes[4] = {CS5, CS6, CS7, CS8};
#endif
static char *error = "";
struct termioslist
......@@ -227,6 +239,7 @@ int ttyclose(int fd)
remTermios(fd);
int ret = close(fd);
error = strerror(errno);
#endif
debug("ttyclose-done");
return ret + 1;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment