comparison chipsetsw/drivers/drv_app/ffs/board/tmffs.h @ 0:509db1a7b7b8

initial import: leo2moko-r1
author Space Falcon <falcon@ivan.Harhan.ORG>
date Mon, 01 Jun 2015 03:24:05 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:509db1a7b7b8
1 /******************************************************************************
2 * Flash File System (ffs)
3 * Idea, design and coding by Mads Meisner-Jensen, mmj@ti.com
4 *
5 * FFS Testmode protocol definitions
6 *
7 * $Id: tmffs.h 1.16.1.3 Fri, 30 Aug 2002 15:11:37 +0200 tsj $
8 *
9 ******************************************************************************/
10
11
12 /******************************************************************************
13 * Prototypes
14 ******************************************************************************/
15
16 int tm_ffs(unsigned char *outp, int outsize, unsigned char *inp, int insize);
17 int tmffs_bufsize(void);
18 unsigned char *tmffs_bufaddr(void);
19
20 // Version of the TMFFS protocol
21 #define TMFFS1_VERSION ((uint16) 0x0188)
22
23 // Version of the TMFFS2 protocol
24 #define TMFFS2_VERSION ((uint16) 0x0300)
25
26 #ifdef TMFFS1
27 #define FFS_TM_VERSION TMFFS1_VERSION
28 #endif
29
30 #ifdef TMFFS2
31 #define FFS_TM_VERSION TMFFS2_VERSION
32 #endif
33
34 /******************************************************************************
35 * FFS1 Protocol Indentifiers
36 ******************************************************************************/
37
38 typedef enum FFS_PROTOCOL_IDENTIFIERS {
39 FPI_END = 0, /* end */
40 FPI_BEGIN, /* begin */
41 FPI_TMFFS_VERSION, /* tmffs_version */
42
43 FPI_PREFORMAT, /* preformat */
44 FPI_FORMAT, /* format */
45
46 FPI_FCREATE, /* fcreate */
47 FPI_FUPDATE, /* fupdate */
48 FPI_FWRITE, /* fwrite */
49 FPI_FREAD, /* fread */
50 FPI_REMOVE, /* remove */
51
52 FPI_MKDIR, /* mkdir */
53 FPI_OPENDIR, /* opendir */
54 FPI_READDIR, /* readdir */
55
56 FPI_STAT, /* stat */
57 FPI_LINKSTAT, /* linkstat */
58
59 FPI_SYMLINK, /* symlink */
60 FPI_READLINK, /* readlink */
61
62 FPI_QUERY, /* query */
63 FPI_FCONTROL, /* fcontrol */
64
65 FPI_INIT, /* init */
66 FPI_EXIT, /* exit */
67
68 FPI_PCM_GETFILEINFO, /* getfileinfo */
69 FPI_PCM_READFILE, /* readfile */
70 FPI_PCM_WRITEFILE, /* writefile */
71 FPI_PCM_READRECORD, /* readrecord */
72 FPI_PCM_WRITERECORD, /* writerecord */
73
74 FPI_BUFREAD, /* buf_read */
75 FPI_BUFWRITE, /* buf_write */
76 FPI_BUFSET, /* buf_set */
77
78 FPI_UINT8, /* UINT8 */
79 FPI_UINT16, /* UINT16 */
80 FPI_UINT32, /* UINT32 */
81 FPI_INT8, /* INT8 */
82 FPI_INT16, /* INT16 */
83 FPI_INT32, /* INT32 */
84 FPI_BUFFER, /* BUFFER */
85 FPI_DATA, /* DATA */
86 FPI_STRBUF, /* STRBUF */
87 FPI_STRING, /* STRING */
88
89 FPI_TFFS /* TFFS */
90
91 } tmffs_cid_t;
92
93 typedef tmffs_cid_t tmffs_proto_type_t;
94
95
96 /******************************************************************************
97 * FFS2 Protocol Indentifiers
98 ******************************************************************************/
99
100 typedef enum FFS2_PROTOCOL_IDENTIFIERS {
101 TMFFS_FORMAT = 'f',
102 TMFFS_PREFORMAT = 'p',
103
104 TMFFS_MKDIR = 'm',
105 TMFFS_OPENDIR = 'o',
106 TMFFS_READDIR = 'D',
107 TMFFS_REMOVE = 'd',
108 TMFFS_RENAME = 'n',
109 TMFFS_XLSTAT = 'x',
110
111 TMFFS_SYMLINK = 'y',
112 TMFFS_READLINK = 'Y',
113
114 TMFFS_OPEN = 'O',
115 TMFFS_CLOSE = 'C',
116 TMFFS_READ = 'R',
117 TMFFS_WRITE = 'W',
118 TMFFS_SEEK = 'S',
119
120 TMFFS_FTRUNCATE = 'T',
121 TMFFS_TRUNCATE = 't',
122
123 TMFFS_FILE_READ = 'r',
124 TMFFS_FILE_WRITE = 'w',
125
126 TMFFS_FSTAT = 'F',
127 TMFFS_LSTAT = 'l',
128 TMFFS_STAT = 's',
129
130 TMFFS_FCONTROL = 'c',
131 TMFFS_QUERY = 'q',
132
133 TMFFS_INIT = 'i',
134 TMFFS_EXIT = 'e',
135
136 // Special
137 TMFFS_DIRXLSTAT = 'X',
138
139 TMFFS_VERSION = 'v',
140 TMFFS_TFFS = 'z'
141 } tmffs2_cid_t;
142
143