comparison src/cs/drivers/drv_app/ffs/board/ffstrace.h @ 0:92470e5d0b9e

src: partial import from FC Selenite
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 15 May 2020 01:28:16 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:92470e5d0b9e
1 /******************************************************************************
2 * Flash File System (ffs)
3 * Idea, design and coding by Mads Meisner-Jensen, mmj@ti.com
4 *
5 * ffs tracing
6 *
7 * $Id: ffstrace.h 1.38.1.4 Wed, 14 Aug 2002 13:02:34 +0200 tsj $
8 *
9 ******************************************************************************/
10
11
12 /******************************************************************************
13 ** Common Tracing and logging
14 *****************************************************************************/
15
16 int tr_query(int mask);
17
18
19 /******************************************************************************
20 ** Target Tracing
21 ******************************************************************************/
22
23 #if (TARGET == 1)
24
25 #define tw(contents)
26 #define ttw(contents) contents
27 #define tlw(contents)
28 #define NL
29 void ttr_init(unsigned int mask);
30 void ttr(unsigned trmask, char *format, ...);
31 void str(unsigned mask, char *string);
32
33 void led_config(unsigned char n);
34 void led_set(unsigned char n);
35 void led_counter(unsigned char n);
36 void led_on(unsigned char n);
37 void led_off(unsigned char n);
38 void led_toggle(unsigned char n);
39
40 enum TargetTraceMask {
41 TTrTest = 0x00000001,
42 TTrTestInfo = 0x00000002,
43
44 TTrApi = 0x00000010,
45 TTrDrvWrite = 0x00000020,
46 TTrDrvErase = 0x00000040,
47 TTrDrvOther = 0x00000080,
48
49 TTrInit = 0x00000100,
50 TTrInitLow = 0x00000200,
51 TTrFormat = 0x00000400,
52
53 TTrObj = 0x00001000,
54 TTrInode = 0x00002000,
55 TTrData = 0x00004000,
56 TTrMisc = 0x00008000,
57
58 TTrRec = 0x00020000,
59 TTrPcmRead = 0x00040000,
60 TTrPcmWrite = 0x00080000,
61
62 TTrTask = 0x00100000,
63 TTrTaskLow = 0x00200000,
64 TTrBstat = 0x00400000,
65
66 TTrTmffs = 0x08000000,
67
68 TTrTaskDelays = 0x10000000,
69 TTrFatal = 0x80000000,
70
71 TTrAll = 0xFFFFFFFF
72 };
73
74 enum {
75 LED_INIT = 0,
76 LED_DRV_INIT = 1,
77 LED_BLOCKS_FSCK = 2,
78 LED_INODES_FSCK = 3,
79 LED_WRITE_SUSPEND = 4,
80 LED_WRITE = 5,
81 LED_ERASE_SUSPEND = 6,
82 LED_ERASE = 7
83 };
84
85
86 /******************************************************************************
87 ** PC Tracing
88 ******************************************************************************/
89
90 #else // (TARGET == 1)
91
92 void tr_init(unsigned int mask, int spaces, char *filename);
93 void tr(int type, unsigned int mask, char *format, ...);
94
95
96 //void tr_init(int mask, int level,int spaces, char *filename);
97 //void tr(int level, int type, char *format, ...);
98 #define tw(contents) contents
99 #define ttw(contents)
100 #define tlw(contents)
101
102 #define led_config(n)
103 #define led_set(n)
104 #define led_counter(n)
105 #define led_on(n)
106 #define led_off(n)
107
108 enum SimulationTraceMask {
109 TrTest = 0x00000001,
110 TrTestHigh = 0x00000002,
111 TrTestLow = 0x00000004,
112 TrApi = 0x00000008,
113
114 TrBstat = 0x00000010,
115 TrFormat = 0x00000020,
116 TrFsck = 0x00000040,
117 TrFsckLow = 0x00000080,
118
119 TrObject = 0x00000100, // object_create/remove/read/stat, etc.
120 TrLookup = 0x00000200,
121 TrDirLow = 0x00000400,
122 TrDirHigh = 0x00000800,
123
124 TrBlock = 0x00001000, // block_alloc/free, etc.
125 TrInode = 0x00002000, // inode_alloc, etc.
126 TrData = 0x00004000, // data_alloc
127
128 TrIReclaim = 0x00010000,
129 TrDReclaim = 0x00020000,
130 TrReclaimLow = 0x00040000,
131 TrJournal = 0x00080000,
132
133 TrDrvInit = 0x00100000,
134 TrDrvWrite = 0x00200000,
135 TrDrvErase = 0x00400000,
136
137 TrOther = 0x01000000, // object_control, query, etc.
138 TrUtil = 0x02000000,
139 TrTmffs = 0x03000000,
140 TrServer = 0x08000000,
141
142 TrTrace = 0x80000000,
143 TrAll = 0xFFFFFFFF
144 };
145
146 enum TRACE_TYPES {
147 TR_BEGIN = 0x100,
148 TR_END = 0x200,
149 TR_FUNC = 0x400,
150 TR_NULL = 0x800
151 };
152
153
154 #endif // (TARGET == 1)