aboutsummaryrefslogtreecommitdiff
path: root/xbee/xbee_io.h
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-02-11 00:50:16 +0000
committerIOhannes m zmölnig <zmoelnig@iem.at>2015-10-14 15:08:26 +0200
commit8238e049724286e6a8af96734c71e826c6826006 (patch)
tree0ded72c5b541072cb400bef2e412a30846855e39 /xbee/xbee_io.h
parentef417b58265bc400d687783c341f84c87b5daa09 (diff)
first attempt at a Pd port, it compiles without any real warnings, now we just need an xbee to test on!
svn path=/trunk/externals/io/; revision=10754
Diffstat (limited to 'xbee/xbee_io.h')
-rw-r--r--xbee/xbee_io.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/xbee/xbee_io.h b/xbee/xbee_io.h
new file mode 100644
index 0000000..a7f5363
--- /dev/null
+++ b/xbee/xbee_io.h
@@ -0,0 +1,34 @@
+/*
+ * xbee_io.h
+ * xbee_test
+ *
+ * Created by Tymm on 11/24/08.
+ * Copyright 2008 __MyCompanyName__. All rights reserved.
+ *
+ */
+
+#ifndef XBEE_IO_H
+#define XBEE_IO_H
+
+#include <pthread.h>
+
+#include "xbee.h"
+
+
+#define XBEE_IO_BUFSIZ 16384
+
+typedef struct {
+ int fd;
+ int pipe_fds[2]; // For indicating new data ready
+ pthread_t io_thread;
+ int io_done;
+ int io_running;
+ int out_buffer_start;
+ int out_buffer_end;
+ char out_buffer[XBEE_IO_BUFSIZ];
+} xbee_io_context_t;
+
+int xbee_new_io_thread(xbee_t *xbee);
+int xbee_kill_io_thread(xbee_t *xbee);
+
+#endif /* #ifndef XBEE_IO_H ... */