aboutsummaryrefslogtreecommitdiff
path: root/slip_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'slip_internal.h')
-rw-r--r--slip_internal.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/slip_internal.h b/slip_internal.h
index 103f72d..e3b7af0 100644
--- a/slip_internal.h
+++ b/slip_internal.h
@@ -37,15 +37,23 @@
#include "hal_internal.h"
-/* Defined in slip.c - send/recv a block of data with SLIP framing.
+/* Defined in slip.c - send/recv serial data with SLIP framing.
*/
-extern int hal_slip_send(const uint8_t * const p, const size_t len);
-extern int hal_slip_recv(uint8_t * const p, const size_t len);
+extern hal_error_t hal_slip_send_char(const uint8_t c);
+extern hal_error_t hal_slip_send(const uint8_t * const buf, const size_t len);
+extern hal_error_t hal_slip_recv_char(uint8_t * const buf, size_t * const len, const size_t maxlen, int * const complete);
+extern hal_error_t hal_slip_recv(uint8_t * const buf, size_t * const len, const size_t maxlen);
-/* Defined in rpc_[client|server]_serial.c - send/recv one byte over a
- * serial connection.
+/* Defined in rpc_serial.c - send/recv one byte over a serial connection.
*/
-extern int hal_slip_send_char(const uint8_t c);
-extern int hal_slip_recv_char(uint8_t * const c);
+extern hal_error_t hal_serial_send_char(const uint8_t c);
+extern hal_error_t hal_serial_recv_char(uint8_t * const c);
+
+#ifndef STM32F4XX
+#include <termios.h> /* speed_t */
+extern hal_error_t hal_serial_init(const char * const device, const speed_t speed);
+extern hal_error_t hal_serial_close(void);
+extern int hal_serial_get_fd(void);
+#endif
#endif /* _HAL_SLIP_INTERNAL_H */