From 01bd9cbc6fe64f236a1b467f011e56dcae0306e7 Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Fri, 24 Oct 2025 16:55:59 -0400 Subject: table module --- fw/types.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'fw/types.h') diff --git a/fw/types.h b/fw/types.h index ccdf0ae..7532c6b 100644 --- a/fw/types.h +++ b/fw/types.h @@ -13,6 +13,7 @@ typedef enum { } Status; typedef uint8_t U8; +typedef int8_t I8; typedef struct { U8 hi, lo; @@ -21,8 +22,19 @@ typedef struct { // Little-endian 32-bit unsigned integer. typedef U8 U32[4]; -// *a = *a+b -void addU16(U16 *a, U8 b); +// a + b +U16 addU16(U16 a, U16 b); -// *a = *a<> b +U16 rshiftU16(U16 a, U8 b); + +// -1 if a < b +// 0 if a == b +// +1 if a > b +I8 cmpU16(U16 a, U16 b); -- cgit v1.2.3