aboutsummaryrefslogtreecommitdiffstats
path: root/fw/types.h
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2025-11-08 14:30:11 -0500
committerSam Anthony <sam@samanthony.xyz>2025-11-08 14:30:11 -0500
commitd7fb6037e427aafc33b981bba2ae7d29e77d9ff0 (patch)
treebee71010f9fadb71dc622a0f8ace795520c46915 /fw/types.h
parent1e5fc7e03877d43a3376b3aefb81949ccbd6d28a (diff)
downloadcan-gauge-interface-d7fb6037e427aafc33b981bba2ae7d29e77d9ff0.zip
limit table keys to i32; add table linear interpolation
Diffstat (limited to 'fw/types.h')
-rw-r--r--fw/types.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/fw/types.h b/fw/types.h
index f772878..502adb2 100644
--- a/fw/types.h
+++ b/fw/types.h
@@ -18,33 +18,3 @@ typedef uint32_t U32;
typedef int8_t I8;
typedef int16_t I16;
typedef int32_t I32;
-
-typedef enum {
- NUM_U8,
- NUM_U16,
- NUM_U32,
- NUM_I8,
- NUM_I16,
- NUM_I32,
-} NumType;
-
-// Number
-typedef struct {
- NumType type;
- union {
- U8 u8;
- U16 u16;
- U32 u32;
- I8 i8;
- I16 i16;
- I32 i32;
- };
-} Number;
-
-Status u32ToNum(U32 x, NumType t, Number *n);
-
-// Compare two numbers.
-// -1 if a < b
-// 0 if a == b
-// 1 if a > b
-Status cmpNum(Number a, Number b, int *ord);