aboutsummaryrefslogtreecommitdiff
path: root/shared/serial_parse.h
diff options
context:
space:
mode:
Diffstat (limited to 'shared/serial_parse.h')
-rw-r--r--shared/serial_parse.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/shared/serial_parse.h b/shared/serial_parse.h
index a1c8fb9..0816ea1 100644
--- a/shared/serial_parse.h
+++ b/shared/serial_parse.h
@@ -1,8 +1,17 @@
#pragma once
+/** @file serial_parse.h */
+
#include <stdint.h>
+#include "bool.h"
#include "protocol.h"
-/** parse serial data byte by byte */
-void w2_serial_parse(uint8_t byte);
+#define W2_SERIAL_READ_SUCCESS true
+#define W2_SERIAL_READ_FAILURE false
+
+/**
+ * parse serial data byte by byte
+ * @return true if read success, false if read fails
+ */
+bool w2_serial_parse(uint8_t byte);