aboutsummaryrefslogtreecommitdiffstats
path: root/fw/types.c
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2025-09-06 13:24:11 -0400
committerSam Anthony <sam@samanthony.xyz>2025-09-06 13:24:11 -0400
commit366330d3943ec4e066197a8d034d90caf8422a1d (patch)
treeeef4e0cc7882f77be931b81c8b5bb4c91dbcc0aa /fw/types.c
parentdf3ed451bf11d40e6369b0333fef92c536c57b4d (diff)
downloadcan-gauge-interface-366330d3943ec4e066197a8d034d90caf8422a1d.zip
fw: handle "w" write eeprom command
Diffstat (limited to 'fw/types.c')
-rw-r--r--fw/types.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fw/types.c b/fw/types.c
index c18392e..a6c2411 100644
--- a/fw/types.c
+++ b/fw/types.c
@@ -5,9 +5,9 @@
#include "types.h"
void
-incU16(U16 *x) {
- x->lo++;
- if (x->lo == 0u) {
- x->hi++;
+addU16(U16 *a, U8 b) {
+ a->lo += b;
+ if (STATUSbits.C) {
+ a->hi++;
}
}