index.h 309 B

12345678910111213141516171819202122
  1. #ifndef INDEX_H
  2. #define INDEX_H
  3. #include "typedef.h"
  4. #define TABLE(t) t, ARRAY_SIZE(t)
  5. int index_of_table8(u8 value, const u8 *table, int table_size);
  6. int index_of_table16(u16 value, const u16 *table, int table_size);
  7. int index_of_table32(u32 value, const u32 *table, int table_size);
  8. #endif