mirror of https://github.com/wb2osz/direwolf.git
27 lines
424 B
C
27 lines
424 B
C
|
/* serial_port.h */
|
||
|
|
||
|
|
||
|
|
||
|
#if __WIN32__
|
||
|
|
||
|
#include <stdlib.h>
|
||
|
#include <windows.h>
|
||
|
|
||
|
typedef HANDLE MYFDTYPE;
|
||
|
#define MYFDERROR INVALID_HANDLE_VALUE
|
||
|
|
||
|
#else
|
||
|
|
||
|
typedef int MYFDTYPE;
|
||
|
#define MYFDERROR (-1)
|
||
|
|
||
|
#endif
|
||
|
|
||
|
|
||
|
extern MYFDTYPE serial_port_open (char *devicename, int baud);
|
||
|
|
||
|
extern int serial_port_write (MYFDTYPE fd, char *str, int len);
|
||
|
|
||
|
extern int serial_port_get1 (MYFDTYPE fd);
|
||
|
|
||
|
extern void serial_port_close (MYFDTYPE fd);
|