aboutsummaryrefslogtreecommitdiff
path: root/shared/serial_parse.h
diff options
context:
space:
mode:
authorHoodieJeansJordans <104365411+HoodieJeansJordans@users.noreply.github.com>2022-06-05 13:21:09 +0200
committerGitHub <noreply@github.com>2022-06-05 13:21:09 +0200
commitbc283424c699effcfa84816c609ca7f00ed5259a (patch)
treeff67ced022120ae05997c1b1f3a49db992e4fcbf /shared/serial_parse.h
parent5692ca8c65f5f5617d6987b610e425a32c0d8e1d (diff)
parent38d71eb97dbd8f895ed483128b332f018a5ae1d4 (diff)
Merge branch 'lonkaars:master' into master
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);