aboutsummaryrefslogtreecommitdiff
path: root/testing/yup-comm/comm/serial_port.h
diff options
context:
space:
mode:
Diffstat (limited to 'testing/yup-comm/comm/serial_port.h')
-rw-r--r--testing/yup-comm/comm/serial_port.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/testing/yup-comm/comm/serial_port.h b/testing/yup-comm/comm/serial_port.h
new file mode 100644
index 0000000..db9dfe9
--- /dev/null
+++ b/testing/yup-comm/comm/serial_port.h
@@ -0,0 +1,16 @@
+/* Author: Jan Sucan */
+
+#ifndef SERIAL_PORT_H
+#define SERIAL_PORT_H 1
+
+#include <windows.h>
+#include <stdint.h>
+
+HANDLE serial_port_open(const char * const portName);
+void serial_port_close(HANDLE serial_port);
+int serial_port_write_byte(HANDLE serial_port, uint8_t * const data, unsigned size);
+int serial_port_read_byte(HANDLE serial_port, uint8_t * const byte);
+LPSTR serial_port_get_error(void);
+void serial_port_free_error(LPSTR msg);
+
+#endif