From b71dd676b5ebe3feec1eb2194e20453a3d01705d Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Sat, 1 Nov 2025 20:32:55 -0400 Subject: lookup output value in table --- fw/table.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fw/table.h') diff --git a/fw/table.h b/fw/table.h index cba263d..a5cfb7b 100644 --- a/fw/table.h +++ b/fw/table.h @@ -22,7 +22,7 @@ enum { TAB_KEY_SIZE = sizeof(U32), - TAB_VAL_SIZE = sizeof(U32), + TAB_VAL_SIZE = sizeof(U16), TAB_ROWS = 32, TAB_ROW_SIZE = TAB_KEY_SIZE + TAB_VAL_SIZE, TAB_SIZE = TAB_ROWS * TAB_ROW_SIZE, @@ -33,12 +33,12 @@ typedef struct { } Table; // Set the key and value of row k. -Status tabWrite(const Table *tab, U8 k, U16 key, U16 val); +Status tabWrite(const Table *tab, U8 k, U32 key, U16 val); // Read row k. -Status tabRead(const Table *tab, U8 k, U16 *key, U16 *val); +Status tabRead(const Table *tab, U8 k, U32 *key, U16 *val); // Lookup the value associated with given key. // If key falls between two rows, the value is interpolated // from the two adjacent. -Status tabLookup(const Table *tab, U16 key, U16 *val); +Status tabLookup(const Table *tab, Number key, U16 *val); -- cgit v1.2.3