-
Notifications
You must be signed in to change notification settings - Fork 2
/
usbserial_win32.h
53 lines (47 loc) · 1.31 KB
/
usbserial_win32.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef _USBSERIAL_WIN32
#define _USBSERIAL_WIN32
#include <process.h>
#include <Winsock2.h>
#define __func__ __FUNCTION__
#define DEFAULT_USB_DEV "\\\\.\\COM4"
typedef int tcflag_t;
//threads
#define END_TREAD() _endthread()
#define SPAWN_THREAD(threadfn, params) \
{\
_beginthread( threadfn, 0, params );\
}\
extern int optind;
extern char *optarg;
extern int getopt(int nargc, char * const nargv[], const char *ostr);
#define B50 50
#define B75 75
#define B110 110
#define B134 134
#define B150 150
#define B200 200
#define B300 300
#define B600 600
#define B1200 1200
#define B1800 1800
#define B2400 2400
#define B4800 4800
#define B9600 9600
#define B19200 19200
#define B38400 38400
#define B57600 57600
#define B115200 115200
#define B230400 230400
#define B460800 460800
#define B500000 500000
#define B576000 576000
#define B921600 921600
#define B1000000 1000000
#define B1152000 1152000
#define B1500000 1500000
#define B2000000 2000000
#define B2500000 2500000
#define B3000000 3000000
#define B3500000 3500000
#define B4000000 4000000
#endif