Update contrib.
5 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
7 * This component and the accompanying materials are made available
8 * under the terms of the License "Eclipse Public License v1.0"
9 * which accompanies this distribution, and is available
10 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
12 * Initial Contributors:
13 * Nokia Corporation - initial contribution.
27 #include <d32usbdescriptors.h>
32 Debug macro for serial port logging of function names and signatures
34 #define LOG_CFUNC TFunctionLog funcLog(__PRETTY_FUNCTION__, NULL);
35 #define LOG_FUNC TFunctionLog funcLog(__PRETTY_FUNCTION__,this);
37 #define LOG_POINT(x) RDebug::Printf(">> Debug point: " #x);
39 //#define LOG_INFO(x) RDebug::Print x;
45 Debug function to print out (log) the data for the descriptor
46 @param aDescriptor the host-side view of the descriptor
48 inline void PrintDescriptorBlob(TUsbGenericDescriptor& aDescriptor);
58 TFunctionLog(const char* aFunctionName,void* aThisPointer)
59 : iFunctionName(aFunctionName),
60 iThisPointer(aThisPointer)
62 RDebug::Printf("\nIN [%08x] %s",iThisPointer,iFunctionName);
70 RDebug::Printf("OUT [%08x] %s\n",iThisPointer,iFunctionName);
74 const char* iFunctionName;
79 This class describes a logger for test case actions
87 static TInt Print(const TDesC8& aLogAction)
89 return Instance().iLogFile.Write(aLogAction);
94 Get the singleton instance
96 static RLog& Instance()
98 static RLog singleton;
107 TInt err(iFileServer.Connect());
110 User::Panic(_L("RTEST 84"),err);
112 err = iLogFile.Replace(iFileServer,_L("usbdi_testlog.txt"),EFileWrite);
134 The session with the file server
146 void PrintDescriptorBlob(TUsbGenericDescriptor& aDescriptor)
148 for(int i=0; i<aDescriptor.iBlob.Length(); i++)
150 RDebug::Printf("<Type %d><Blob 0x%02x>",aDescriptor.ibDescriptorType,aDescriptor.iBlob[i]);