aboutsummaryrefslogtreecommitdiff
path: root/src/modules/systemlib/hx_stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/systemlib/hx_stream.h')
-rw-r--r--src/modules/systemlib/hx_stream.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/modules/systemlib/hx_stream.h b/src/modules/systemlib/hx_stream.h
index 128689953..be4850f74 100644
--- a/src/modules/systemlib/hx_stream.h
+++ b/src/modules/systemlib/hx_stream.h
@@ -114,9 +114,25 @@ __EXPORT extern int hx_stream_send(hx_stream_t stream,
* @param stream A handle returned from hx_stream_init.
* @param c The character to process.
*/
-__EXPORT extern void hx_stream_rx(hx_stream_t stream,
+__EXPORT extern void hx_stream_rx_char(hx_stream_t stream,
uint8_t c);
+/**
+ * Handle received bytes from the stream.
+ *
+ * Note that this interface should only be used with blocking streams
+ * when it is OK for the call to block until a frame is received.
+ *
+ * When used with a non-blocking stream, it will typically return
+ * immediately, or after handling a received frame.
+ *
+ * @param stream A handle returned from hx_stream_init.
+ * @return -errno on error, nonzero if a frame
+ * has been received, or if not enough
+ * bytes are available to complete a frame.
+ */
+__EXPORT extern int hx_stream_rx(hx_stream_t stream);
+
__END_DECLS
#endif