aboutsummaryrefslogtreecommitdiffstats
path: root/fw/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'fw/types.c')
-rw-r--r--fw/types.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fw/types.c b/fw/types.c
index a6c2411..d87c891 100644
--- a/fw/types.c
+++ b/fw/types.c
@@ -11,3 +11,9 @@ addU16(U16 *a, U8 b) {
a->hi++;
}
}
+
+void
+lshiftU16(U16 *a, U8 b) {
+ a->hi = (U8)(a->hi << b) | (a->lo >> (8u-b));
+ a->lo <<= b;
+}