tab.h (500B)
1 #ifndef TA_TAB_H
2 #define TA_TAB_H
3
4 #include <stdint.h>
5 #include <stdbool.h>
6
7 #define TA_TAB_MAGIC_0 'T'
8 #define TA_TAB_MAGIC_1 'A'
9 #define TA_TAB_MAGIC_2 'B'
10 #define TA_TAB_MAGIC_3 'F'
11 #define TA_TAB_VERSION 1
12 #define TA_TAB_HEADER_SIZE 5
13 #define TA_TAB_ENTRY_SIZE 9
14 #define TA_TAB_MAX_FILES 255
15 #define TA_TAB_END 0
16 #define TA_TAB_MAIN_PROGRAM 1
17
18 bool ta_tab_load(const char *path);
19 void ta_tab_unload(void);
20 bool ta_tab_find(uint8_t file, const uint8_t **data, uint32_t *size);
21
22 #endif // TA_TAB_H