diff options
Diffstat (limited to 'bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/pipe.h')
| -rw-r--r-- | bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/pipe.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/pipe.h b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/pipe.h new file mode 100644 index 0000000..a0786ab --- /dev/null +++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/pipe.h @@ -0,0 +1,30 @@ +#ifndef PIPE_H +#define PIPE_H + +#include "sio.h" +#include "sock.h" +#include "thread.h" + +typedef struct +{ + /* Serial port */ + sio_s sio; + + /* Socket */ + tcpsock_s sock; + + /* Mutex lock */ + thr_mutex_t *mutex; + + /* Time out in seconds */ + int timeout; + + /* Convert newlines from the serial port to nils? */ + int newlines; +} pipe_s; + +int pipe_init(pipe_s *pipe, int sock_port); +void pipe_cleanup(pipe_s *pipe); +void pipe_destroy(void *data); + +#endif /* PIPE_H */ |
