diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-05-27 13:49:35 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-05-27 13:49:35 +0200 |
commit | def257fcd9769d3572dbf5bdd076e4ce470fc8ec (patch) | |
tree | 4fd442954b5c6ff6319c20da03a28406f1bbf5ad /shared/serial_parse.h | |
parent | 4c4d045329c4a149bae0b53952c39c14243e1870 (diff) |
remove windows sim compatibility and fix 0xff byte handling
Diffstat (limited to 'shared/serial_parse.h')
-rw-r--r-- | shared/serial_parse.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/shared/serial_parse.h b/shared/serial_parse.h index 03c420f..0816ea1 100644 --- a/shared/serial_parse.h +++ b/shared/serial_parse.h @@ -4,7 +4,14 @@ #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); |