direwolf/serial_port.h
WB2OSZ 1f8b330185 Generate NMEA waypoint sentences ($PKWDWPL, etc.) for position and object reports.
These can be used by Geosat AvMap or other mapping applications.
2016-03-20 19:23:09 -04:00

33 lines
480 B
C

/* serial_port.h */
#ifndef SERIAL_PORT_H
#define SERIAL_PORT_H 1
#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);
#endif