aboutsummaryrefslogtreecommitdiff
path: root/port.h
diff options
context:
space:
mode:
Diffstat (limited to 'port.h')
-rw-r--r--port.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/port.h b/port.h
new file mode 100644
index 0000000..9b86a48
--- /dev/null
+++ b/port.h
@@ -0,0 +1,14 @@
+#ifndef PORT_H
+#define PORT_H
+
+#include <libserialport.h>
+
+#define ATTENTION_REQ 0x16
+#define ATTENTION_ACK 0x13
+
+void wait_calc(struct sp_port *port);
+void send_calc_byte(struct sp_port *port, const char val);
+enum sp_return calc_read(struct sp_port *port, unsigned char* buffer, size_t size);
+struct sp_port* port_init(const char* device);
+
+#endif