From b6f27be4eda4ec0e50aaca8eb3a117db60b4067e Mon Sep 17 00:00:00 2001 From: Jakob Odersky Date: Thu, 27 Mar 2014 20:19:28 +0100 Subject: re-implement native side (TODO: direct buffers) --- flow/src/main/native/posix/flow.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'flow/src/main/native/posix/flow.c') diff --git a/flow/src/main/native/posix/flow.c b/flow/src/main/native/posix/flow.c index 18aa9c2..c408670 100644 --- a/flow/src/main/native/posix/flow.c +++ b/flow/src/main/native/posix/flow.c @@ -4,8 +4,10 @@ #include #include #include +#include #include "flow.h" + #define DATA_CANCEL 0xffffffff static bool debug = false; @@ -186,7 +188,7 @@ int serial_close(struct serial_config* const serial) { return 0; } -int serial_read(struct serial_config* const serial, unsigned char* const buffer, size_t size) { +int serial_read(struct serial_config* const serial, char* const buffer, size_t size) { int port = serial->port_fd; int pipe = serial->pipe_read_fd; @@ -234,7 +236,7 @@ int serial_cancel_read(struct serial_config* const serial) { return 0; } -int serial_write(struct serial_config* const serial, unsigned char* const data, size_t size) { +int serial_write(struct serial_config* const serial, char* const data, size_t size) { int r = write(serial->port_fd, data, size); if (r < 0) { DEBUG(perror("error writing to port");); -- cgit v1.2.3