Update contrib.
1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32\include\drivers\iic_trace.h
16 // WARNING: This file contains some APIs which are internal and are subject
17 // to change without notice. Such APIs should therefore not be used
18 // outside the Kernel and Hardware Services package.
26 #ifndef __IIC_TRACE_H__
27 #define __IIC_TRACE_H__
30 //Function to format the output.
31 static void IicTraceFormatPrint(TDes8& aBuf, const char* aFmt, ...)
37 Kern::AppendFormat(aBuf,aFmt,list);
40 //definition of subcategories.
41 #define IIC_REGISTERCHANS_START_PSL BTrace::ERegisterChansStartPsl
42 #define IIC_REGISTERCHANS_START_PIL BTrace::ERegisterChansStartPil
43 #define IIC_REGISTERCHANS_END_PIL BTrace::ERegisterChansEndPil
44 #define IIC_REGISTERCHANS_END_PSL BTrace::ERegisterChansEndPsl
45 #define IIC_DEREGISTERCHAN_START_PSL BTrace::EDeRegisterChanStartPsl
46 #define IIC_DEREGISTERCHAN_START_PIL BTrace::EDeRegisterChanStartPil
47 #define IIC_DEREGISTERCHAN_END_PIL BTrace::EDeRegisterChanEndPil
48 #define IIC_DEREGISTERCHAN_END_PSL BTrace::EDeRegisterChanEndPsl
49 #define IIC_MQTRANSSYNC_START_PIL BTrace::EMQTransSyncStartPil
50 // #define IIC_MQTRANSSYNC_START_PSL BTrace::EMQTransSyncStartPsl
51 // #define IIC_MQTRANSSYNC_END_PSL BTrace::EMQTransSyncEndPsl
52 #define IIC_MQTRANSSYNC_END_PIL BTrace::EMQTransSyncEndPil
53 #define IIC_MQTRANSASYNC_START_PIL BTrace::EMQTransAsyncStartPil
54 // #define IIC_MQTRANSASYNC_START_PSL BTrace::EMQTransAsyncStartPsl
55 // #define IIC_MQTRANSASYNC_END_PSL BTrace::EMQTransAsyncEndPsl
56 #define IIC_MQTRANSASYNC_END_PIL BTrace::EMQTransAsyncEndPil
57 #define IIC_MCANCELTRANS_START_PIL BTrace::EMCancelTransStartPil
58 // #define IIC_MCANCELTRANS_START_PSL BTrace::EMCancelTransStartPsl
59 // #define IIC_MCANCELTRANS_END_PSL BTrace::EMCancelTransEndPsl
60 #define IIC_MCANCELTRANS_END_PIL BTrace::EMCancelTransEndPil
61 #define IIC_MPROCESSTRANS_START_PIL BTrace::EMProcessTransStartPil
62 #define IIC_MPROCESSTRANS_START_PSL BTrace::EMProcessTransStartPsl
63 #define IIC_MPROCESSTRANS_END_PSL BTrace::EMProcessTransEndPsl
64 #define IIC_MPROCESSTRANS_END_PIL BTrace::EMProcessTransEndPil
65 #define IIC_SCAPTCHANSYNC_START_PIL BTrace::ESCaptChanSyncStartPil
66 #define IIC_SCAPTCHANSYNC_START_PSL BTrace::ESCaptChanSyncStartPsl
67 #define IIC_SCAPTCHANSYNC_END_PSL BTrace::ESCaptChanSyncEndPsl
68 #define IIC_SCAPTCHANSYNC_END_PIL BTrace::ESCaptChanSyncEndPil
69 #define IIC_SCAPTCHANASYNC_START_PIL BTrace::ESCaptChanASyncStartPil
70 #define IIC_SCAPTCHANASYNC_START_PSL BTrace::ESCaptChanASyncStartPsl
71 #define IIC_SCAPTCHANASYNC_END_PSL BTrace::ESCaptChanASyncEndPsl
72 #define IIC_SCAPTCHANASYNC_END_PIL BTrace::ESCaptChanASyncEndPil
73 #define IIC_SRELCHAN_START_PIL BTrace::ESRelChanStartPil
74 #define IIC_SRELCHAN_START_PSL BTrace::ESRelChanStartPsl
75 #define IIC_SRELCHAN_END_PSL BTrace::ESRelChanEndPsl
76 #define IIC_SRELCHAN_END_PIL BTrace::ESRelChanEndPil
77 #define IIC_SREGRXBUF_START_PIL BTrace::ESRegRxBufStartPil
78 #define IIC_SREGRXBUF_START_PSL BTrace::ESRegRxBufStartPsl
79 #define IIC_SREGRXBUF_END_PSL BTrace::ESRegRxBufEndPsl
80 #define IIC_SREGRXBUF_END_PIL BTrace::ESRegRxBufEndPil
81 #define IIC_SREGTXBUF_START_PIL BTrace::ESRegTxBufStartPil
82 #define IIC_SREGTXBUF_START_PSL BTrace::ESRegTxBufStartPsl
83 #define IIC_SREGTXBUF_END_PSL BTrace::ESRegTxBufEndPsl
84 #define IIC_SREGTXBUF_END_PIL BTrace::ESRegTxBufEndPil
85 #define IIC_SNOTIFTRIG_START_PIL BTrace::ESNotifTrigStartPil
86 #define IIC_SNOTIFTRIG_START_PSL BTrace::ESNotifTrigStartPsl
87 #define IIC_SNOTIFTRIG_END_PSL BTrace::ESNotifTrigEndPsl
88 #define IIC_SNOTIFTRIG_END_PIL BTrace::ESNotifTrigEndPil
89 #define IIC_MSSTATEXT_START_PIL BTrace::EMStatExtStartPil
90 // #define IIC_MSSTATEXT_START_PSL BTrace::EMStatExtStartPsl
91 // #define IIC_MSSTATEXT_END_PSL BTrace::EMStatExtEndPsl
92 #define IIC_MSSTATEXT_END_PIL BTrace::EMStatExtEndPil
93 #define IIC_MSTATEXT_START_PIL BTrace::EMStatExtStartPil
94 #define IIC_MSTATEXT_START_PSL BTrace::EMStatExtStartPsl
95 #define IIC_MSTATEXT_END_PSL BTrace::EMStatExtEndPsl
96 #define IIC_MSTATEXT_END_PIL BTrace::EMStatExtEndPil
97 #define IIC_SSTATEXT_START_PIL BTrace::ESStatExtStartPil
98 #define IIC_SSTATEXT_START_PSL BTrace::ESStatExtStartPsl
99 #define IIC_SSTATEXT_END_PSL BTrace::ESStatExtEndPsl
100 #define IIC_SSTATEXT_END_PIL BTrace::ESStatExtEndPil
102 // Macros for printing
103 #define IIC_REGISTERCHANS_START_PSL_TRACE \
105 BTrace8(BTrace::EIic, IIC_REGISTERCHANS_START_PSL,ChannelPtrArray,NUM_CHANNELS); \
108 #define IIC_REGISTERCHANS_START_PIL_TRACE \
110 BTrace12(BTrace::EIic, IIC_REGISTERCHANS_START_PIL,aListChannels, aNumberChannels, chanArray->Count()); \
113 #define IIC_REGISTERCHANS_END_PIL_TRACE \
115 BTrace8(BTrace::EIic, IIC_REGISTERCHANS_END_PIL,aListChannels, chanArray->Count()); \
118 #define IIC_REGISTERCHANS_END_PSL_TRACE \
120 BTrace8(BTrace::EIic, IIC_REGISTERCHANS_END_PSL,ChannelPtrArray, r); \
123 #define IIC_DEREGISTERCHAN_START_PSL_TRACE \
125 BTrace4(BTrace::EIic, IIC_DEREGISTERCHAN_START_PSL,this); \
128 #define IIC_DEREGISTERCHAN_START_PIL_TRACE \
130 BTrace8(BTrace::EIic, IIC_DEREGISTERCHAN_START_PIL,aChannel,chanArray->Count()); \
133 #define IIC_DEREGISTERCHAN_END_PIL_TRACE \
135 BTrace8(BTrace::EIic, IIC_DEREGISTERCHAN_END_PIL,aChannel,chanArray->Count()); \
138 #define IIC_DEREGISTERCHAN_END_PSL_TRACE \
140 BTrace8(BTrace::EIic, IIC_DEREGISTERCHAN_END_PSL,this,r); \
143 #define IIC_MQTRANSSYNC_START_PIL_TRACE \
145 BTrace8(BTrace::EIic, IIC_MQTRANSSYNC_START_PIL,aBusId, aTransaction); \
148 // #define IIC_MQTRANSSYNC_START_PSL_TRACE
149 // #define IIC_MQTRANSSYNC_END_PSL_TRACE
151 #define IIC_MQTRANSSYNC_END_PIL_TRACE \
153 BTrace8(BTrace::EIic, IIC_MQTRANSSYNC_START_PIL,aBusId, r); \
156 #define IIC_MQTRANSASYNC_START_PIL_TRACE \
158 BTrace12(BTrace::EIic, IIC_MQTRANSASYNC_START_PIL,aBusId, aTransaction, aCallback); \
161 // #define IIC_MQTRANSASYNC_START_PSL_TRACE
162 // #define IIC_MQTRANSASYNC_END_PSL_TRACE
164 #define IIC_MQTRANSASYNC_END_PIL_TRACE \
166 BTrace8(BTrace::EIic, IIC_MQTRANSASYNC_END_PIL,aBusId, r); \
169 #define IIC_MCANCELTRANS_START_PIL_TRACE \
171 BTrace8(BTrace::EIic, IIC_MCANCELTRANS_START_PIL,aBusId, aTransaction); \
174 // #define IIC_MCANCELTRANS_START_PSL_TRACE
175 // #define IIC_MCANCELTRANS_END_PSL_TRACE
177 #define IIC_MCANCELTRANS_END_PIL_TRACE \
179 BTrace8(BTrace::EIic, IIC_MCANCELTRANS_END_PIL,aTransaction,r); \
182 #define IIC_MPROCESSTRANS_START_PIL_TRACE \
184 TBuf8<256> printBuf; \
186 IicTraceFormatPrint(printBuf, "%d", 0); \
187 BTraceN(BTrace::EIic, IIC_MPROCESSTRANS_START_PIL, channel,trans, printBuf.Ptr(), printBuf.Length()); \
190 #define IIC_MPROCESSTRANS_START_PSL_TRACE \
192 BTrace4(BTrace::EIic, IIC_MPROCESSTRANS_START_PSL,aTransaction); \
195 #define IIC_MPROCESSTRANS_END_PSL_TRACE \
197 BTraceContext4(BTrace::EIic, IIC_MPROCESSTRANS_END_PSL,aResult); \
200 #define IIC_MPROCESSTRANS_END_PIL_TRACE \
202 BTraceContext12(BTrace::EIic, IIC_MPROCESSTRANS_END_PIL,aTrans, aResult, aCb); \
205 #define IIC_SCAPTCHANSYNC_START_PIL_TRACE \
207 BTrace8(BTrace::EIic, IIC_SCAPTCHANSYNC_START_PIL,aBusId, aConfigHdr); \
210 #define IIC_SCAPTCHANSYNC_START_PSL_TRACE \
212 BTrace8(BTrace::EIic, IIC_SCAPTCHANSYNC_START_PSL,this,iConfigHeader); \
215 #define IIC_SCAPTCHANSYNC_END_PSL_TRACE \
217 BTrace8(BTrace::EIic, IIC_SCAPTCHANSYNC_END_PSL,this,r); \
220 #define IIC_SCAPTCHANSYNC_END_PIL_TRACE \
222 BTrace12(BTrace::EIic, IIC_SCAPTCHANSYNC_END_PIL,aBusId,aChannelId,r); \
225 #define IIC_SCAPTCHANASYNC_START_PIL_TRACE \
227 BTrace12(BTrace::EIic, IIC_SCAPTCHANASYNC_START_PIL,aBusId, aConfigHdr,aCallback); \
230 #define IIC_SCAPTCHANASYNC_START_PSL_TRACE \
232 BTrace8(BTrace::EIic, IIC_SCAPTCHANASYNC_START_PSL,this,iConfigHeader); \
235 #define IIC_SCAPTCHANASYNC_END_PSL_TRACE \
237 BTraceContext8(BTrace::EIic, IIC_SCAPTCHANASYNC_END_PSL,channel,r); \
240 #define IIC_SCAPTCHANASYNC_END_PIL_TRACE \
242 TBuf8<256> printBuf; \
244 IicTraceFormatPrint(printBuf, "%d", 0); \
245 BTraceN(BTrace::EIic, IIC_SCAPTCHANASYNC_END_PIL, this,aResult, printBuf.Ptr(), printBuf.Length()); \
248 #define IIC_SRELCHAN_START_PIL_TRACE \
250 BTrace4(BTrace::EIic, IIC_SRELCHAN_START_PIL,aChannelId); \
253 #define IIC_SRELCHAN_START_PSL_TRACE \
255 BTrace4(BTrace::EIic, IIC_SRELCHAN_START_PSL,this); \
258 #define IIC_SRELCHAN_END_PSL_TRACE \
260 BTrace8(BTrace::EIic, IIC_SRELCHAN_END_PSL,this,r); \
263 #define IIC_SRELCHAN_END_PIL_TRACE \
265 BTrace8(BTrace::EIic, IIC_SRELCHAN_START_PIL,aChannelId,r); \
268 #define IIC_SREGRXBUF_START_PIL_TRACE \
270 TBuf8<256> printBuf; \
272 IicTraceFormatPrint(printBuf, "%d %d", aNumWords, aOffset); \
273 BTraceN(BTrace::EIic, IIC_SREGRXBUF_START_PIL, (TInt)&aRxBuffer, aBufGranularity, printBuf.Ptr(), printBuf.Length()); \
276 #define IIC_SREGRXBUF_START_PSL_TRACE \
278 TBuf8<256> printBuf; \
280 IicTraceFormatPrint(printBuf, "%d %d %d", aBufGranularity, aNumWords, aOffset); \
281 BTraceN(BTrace::EIic, IIC_SREGRXBUF_START_PSL, this, (TInt)&aRxBuffer, printBuf.Ptr(), printBuf.Length()); \
284 #define IIC_SREGRXBUF_END_PSL_TRACE \
286 BTrace8(BTrace::EIic, IIC_SREGRXBUF_END_PSL,this,r); \
289 #define IIC_SREGRXBUF_END_PIL_TRACE \
291 BTrace4(BTrace::EIic, IIC_SREGRXBUF_END_PIL,r); \
294 #define IIC_SREGTXBUF_START_PIL_TRACE \
296 TBuf8<256> printBuf; \
298 IicTraceFormatPrint(printBuf, "%d %d", aNumWords, aOffset); \
299 BTraceN(BTrace::EIic, IIC_SREGTXBUF_START_PIL, (TInt)&aTxBuffer, aBufGranularity, printBuf.Ptr(), printBuf.Length()); \
302 #define IIC_SREGTXBUF_START_PSL_TRACE \
304 TBuf8<256> printBuf; \
306 IicTraceFormatPrint(printBuf, "%d %d %d", aBufGranularity, aNumWords, aOffset); \
307 BTraceN(BTrace::EIic, IIC_SREGTXBUF_START_PSL, this, (TInt)&aTxBuffer, printBuf.Ptr(), printBuf.Length()); \
310 #define IIC_SREGTXBUF_END_PSL_TRACE \
312 BTrace8(BTrace::EIic, IIC_SREGTXBUF_END_PSL,this,r); \
315 #define IIC_SREGTXBUF_END_PIL_TRACE \
317 BTrace4(BTrace::EIic, IIC_SREGTXBUF_END_PIL,r); \
320 #define IIC_SNOTIFTRIG_START_PIL_TRACE \
322 BTrace8(BTrace::EIic, IIC_SNOTIFTRIG_START_PIL,aChannelId, aTrigger); \
325 #define IIC_SNOTIFTRIG_START_PSL_TRACE \
327 BTrace4(BTrace::EIic, IIC_SNOTIFTRIG_START_PSL,aTrigger); \
330 #define IIC_SNOTIFTRIG_END_PSL_TRACE \
332 BTrace4(BTrace::EIic, IIC_SNOTIFTRIG_END_PSL,r); \
335 #define IIC_SNOTIFTRIG_END_PIL_TRACE \
337 BTrace8(BTrace::EIic, IIC_SNOTIFTRIG_END_PIL,aChannelId, r); \
340 #define IIC_MSSTATEXT_START_PIL_TRACE \
342 TBuf8<256> printBuf; \
344 IicTraceFormatPrint(printBuf, "%d %d ", aParam1, aParam2); \
345 BTraceN(BTrace::EIic, IIC_MSSTATEXT_START_PIL, aId, aFunction, printBuf.Ptr(), printBuf.Length()); \
348 // #define IIC_MSSTATEXT_START_PSL_TRACE
349 // #define IIC_MSSTATEXT_END_PSL_TRACE
351 #define IIC_MSSTATEXT_END_PIL_TRACE \
353 TBuf8<256> printBuf; \
355 IicTraceFormatPrint(printBuf, "%d ", r); \
356 BTraceN(BTrace::EIic, IIC_MSSTATEXT_END_PIL, aId, aFunction, printBuf.Ptr(), printBuf.Length()); \
359 #define IIC_MSTATEXT_START_PIL_TRACE \
361 TBuf8<256> printBuf; \
363 IicTraceFormatPrint(printBuf, "%d %d ", aParam1, aParam2); \
364 BTraceN(BTrace::EIic, IIC_MSTATEXT_START_PIL, aId, aFunction, printBuf.Ptr(), printBuf.Length()); \
367 #define IIC_MSTATEXT_START_PSL_TRACE \
369 TBuf8<256> printBuf; \
371 IicTraceFormatPrint(printBuf, "%d %d ", aParam1, aParam2); \
372 BTraceN(BTrace::EIic, IIC_MSTATEXT_START_PSL, this, aFunction, printBuf.Ptr(), printBuf.Length()); \
375 #define IIC_MSTATEXT_END_PSL_TRACE \
377 TBuf8<256> printBuf; \
379 IicTraceFormatPrint(printBuf, "%d ", r); \
380 BTraceN(BTrace::EIic, IIC_MSTATEXT_END_PSL, this, aFunction, printBuf.Ptr(), printBuf.Length()); \
383 #define IIC_MSTATEXT_END_PIL_TRACE \
385 TBuf8<256> printBuf; \
387 IicTraceFormatPrint(printBuf, "%d ", r); \
388 BTraceN(BTrace::EIic, IIC_MSTATEXT_END_PIL, aId, aFunction, printBuf.Ptr(), printBuf.Length()); \
391 #define IIC_SSTATEXT_START_PIL_TRACE \
393 TBuf8<256> printBuf; \
395 IicTraceFormatPrint(printBuf, "%d %d ", aParam1, aParam2); \
396 BTraceN(BTrace::EIic, IIC_SSTATEXT_START_PIL, aId, aFunction, printBuf.Ptr(), printBuf.Length()); \
399 #define IIC_SSTATEXT_START_PSL_TRACE \
401 TBuf8<256> printBuf; \
403 IicTraceFormatPrint(printBuf, "%d %d ", aParam1, aParam2); \
404 BTraceN(BTrace::EIic, IIC_SSTATEXT_START_PSL, this, aFunction, printBuf.Ptr(), printBuf.Length()); \
407 #define IIC_SSTATEXT_END_PSL_TRACE \
409 TBuf8<256> printBuf; \
411 IicTraceFormatPrint(printBuf, "%d ", r); \
412 BTraceN(BTrace::EIic, IIC_SSTATEXT_END_PSL, this, aFunction, printBuf.Ptr(), printBuf.Length()); \
415 #define IIC_SSTATEXT_END_PIL_TRACE \
417 TBuf8<256> printBuf; \
419 IicTraceFormatPrint(printBuf, "%d ", r); \
420 BTraceN(BTrace::EIic, IIC_SSTATEXT_END_PIL, aId, aFunction, printBuf.Ptr(), printBuf.Length()); \
425 #define IIC_REGISTERCHANS_START_PSL_TRACE
426 #define IIC_REGISTERCHANS_START_PIL_TRACE
427 #define IIC_REGISTERCHANS_END_PIL_TRACE
428 #define IIC_REGISTERCHANS_END_PSL_TRACE
429 #define IIC_DEREGISTERCHAN_START_PSL_TRACE
430 #define IIC_DEREGISTERCHAN_START_PIL_TRACE
431 #define IIC_DEREGISTERCHAN_END_PIL_TRACE
432 #define IIC_DEREGISTERCHAN_END_PSL_TRACE
433 #define IIC_MQTRANSSYNC_START_PIL_TRACE
434 // #define IIC_MQTRANSSYNC_START_PSL_TRACE
435 // #define IIC_MQTRANSSYNC_END_PSL_TRACE
436 #define IIC_MQTRANSSYNC_END_PIL_TRACE
437 #define IIC_MQTRANSASYNC_START_PIL_TRACE
438 // #define IIC_MQTRANSASYNC_START_PSL_TRACE
439 // #define IIC_MQTRANSASYNC_END_PSL_TRACE
440 #define IIC_MQTRANSASYNC_END_PIL_TRACE
441 #define IIC_MCANCELTRANS_START_PIL_TRACE
442 // #define IIC_MCANCELTRANS_START_PSL_TRACE
443 // #define IIC_MCANCELTRANS_END_PSL_TRACE
444 #define IIC_MCANCELTRANS_END_PIL_TRACE
445 #define IIC_MPROCESSTRANS_START_PIL_TRACE
446 #define IIC_MPROCESSTRANS_START_PSL_TRACE
447 #define IIC_MPROCESSTRANS_END_PSL_TRACE
448 #define IIC_MPROCESSTRANS_END_PIL_TRACE
449 #define IIC_SCAPTCHANSYNC_START_PIL_TRACE
450 #define IIC_SCAPTCHANSYNC_START_PSL_TRACE
451 #define IIC_SCAPTCHANSYNC_END_PSL_TRACE
452 #define IIC_SCAPTCHANSYNC_END_PIL_TRACE
453 #define IIC_SCAPTCHANASYNC_START_PIL_TRACE
454 #define IIC_SCAPTCHANASYNC_START_PSL_TRACE
455 #define IIC_SCAPTCHANASYNC_END_PSL_TRACE
456 #define IIC_SCAPTCHANASYNC_END_PIL_TRACE
457 #define IIC_SRELCHAN_START_PIL_TRACE
458 #define IIC_SRELCHAN_START_PSL_TRACE
459 #define IIC_SRELCHAN_END_PSL_TRACE
460 #define IIC_SRELCHAN_END_PIL_TRACE
461 #define IIC_SREGRXBUF_START_PIL_TRACE
462 #define IIC_SREGRXBUF_START_PSL_TRACE
463 #define IIC_SREGRXBUF_END_PSL_TRACE
464 #define IIC_SREGRXBUF_END_PIL_TRACE
465 #define IIC_SREGTXBUF_START_PIL_TRACE
466 #define IIC_SREGTXBUF_START_PSL_TRACE
467 #define IIC_SREGTXBUF_END_PSL_TRACE
468 #define IIC_SREGTXBUF_END_PIL_TRACE
469 #define IIC_SNOTIFTRIG_START_PIL_TRACE
470 #define IIC_SNOTIFTRIG_START_PSL_TRACE
471 #define IIC_SNOTIFTRIG_END_PSL_TRACE
472 #define IIC_SNOTIFTRIG_END_PIL_TRACE
473 #define IIC_MSSTATEXT_START_PIL_TRACE
474 // #define IIC_MSSTATEXT_START_PSL_TRACE
475 // #define IIC_MSSTATEXT_END_PSL_TRACE
476 #define IIC_MSSTATEXT_END_PIL_TRACE
477 #define IIC_MSTATEXT_START_PIL_TRACE
478 #define IIC_MSTATEXT_START_PSL_TRACE
479 #define IIC_MSTATEXT_END_PSL_TRACE
480 #define IIC_MSTATEXT_END_PIL_TRACE
481 #define IIC_SSTATEXT_START_PIL_TRACE
482 #define IIC_SSTATEXT_START_PSL_TRACE
483 #define IIC_SSTATEXT_END_PSL_TRACE
484 #define IIC_SSTATEXT_END_PIL_TRACE
488 #endif //__IIC_TRACE_H__