FreeCalypso > hg > freecalypso-reveng
comparison fluid-mnf/trace.h @ 311:9cecc930d78f
fluid-mnf: original source from TI,
defenestrated line endings and rearranged directory structure,
but no *.[ch] source file content changes yet
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 29 Feb 2020 05:36:07 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
310:ae39d76d5b7a | 311:9cecc930d78f |
---|---|
1 /****************************************************************************** | |
2 * Generic tracing library | |
3 * | |
4 * Idea, design and coding by Mads Meisner-Jensen, mmj@ti.com | |
5 * | |
6 * $Id: trace.h 1.4 Fri, 11 Oct 2002 08:40:21 +0200 mmj $ | |
7 * | |
8 ******************************************************************************/ | |
9 | |
10 #ifndef _TRACE_H_ | |
11 #define _TRACE_H_ | |
12 | |
13 | |
14 /****************************************************************************** | |
15 * Common | |
16 *****************************************************************************/ | |
17 | |
18 enum { | |
19 TrF = 0x00000000, | |
20 TrC = 0x40000000, | |
21 TrB = 0x80000000, | |
22 TrE = 0xC0000000, | |
23 TrTypeMask = 0xC0000000, | |
24 | |
25 TrFunc = TrF, | |
26 TrCont = TrC, // Tracing continue | |
27 TrBegin = TrB, | |
28 TrEnd = TrE, | |
29 | |
30 // Trace Module | |
31 TrAny = 0x3F000000, | |
32 TrModMask = 0x3F000000, | |
33 | |
34 // Trace Mask | |
35 TrAll = 0x00FFFFFF, | |
36 TrBitMask = 0x00FFFFFF | |
37 }; | |
38 | |
39 typedef void (* pf_tr_t) (int, char *, ...); | |
40 typedef void (* pf_tr_hexdump_t) (int, const void *, int); | |
41 | |
42 typedef struct tr_functions_s { | |
43 pf_tr_t tr; | |
44 pf_tr_hexdump_t hexdump; //Fixme tr_hexdump? | |
45 } tr_functions_t; | |
46 | |
47 | |
48 // Trace Wrapper. Used for quickly removing tracing from output code. | |
49 #define tw(wrapping) wrapping | |
50 //#define tw(wrapping) | |
51 | |
52 int tr_init(int spaces, char *filename); | |
53 void tr_enable(int onoff); | |
54 int tr_mask(int mask); | |
55 void tr(int mask, char *format, ...); | |
56 void tr_hexdump(int mask, const void *p, int size); | |
57 | |
58 #endif // _TRACE_H_ |