Update contrib.
1 // Copyright (c) 2002-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 // e32test\mmu\d_sharedio.h
21 #ifndef __KERNEL_MODE__
25 const TInt KSizeGlobalBuffer=0x2000;
26 const TInt KMagic1=12345;
27 const TInt KMagic2=54321;
29 class RTestLdd : public RBusLogicalChannel
38 ECreateBufferPhysAddr,
39 EDestroyBufferPhysAddr,
49 inline TInt CreateBuffer(TInt aLength);
50 inline TInt MapInGlobalBuffer(TUint aProcessId,TAny*& aAddress,TUint32& aLength);
51 inline TInt MapOutGlobalBuffer();
52 inline TInt DestroyGlobalBuffer();
53 inline TInt CreateBufferPhysAddr(TInt aLength);
54 inline TInt DestroyBufferPhysAddr();
55 inline TInt MapInBuffer(TAny** aAddress,TUint32* aLength);
56 inline TInt MapOutBuffer();
57 inline TInt DestroyBuffer();
58 inline TInt CheckBuffer(TUint32 key);
59 inline TInt FillBuffer(TUint32 key);
60 inline TInt ThreadRW(TDes8& aDes,TInt aThreadId=-1);
63 _LIT(KSharedIoTestLddName,"D_SHAREDIO");
65 #ifndef __KERNEL_MODE__
66 inline TInt RTestLdd::Open()
67 { return DoCreate(KSharedIoTestLddName,TVersion(),KNullUnit,NULL,NULL); }
68 inline TInt RTestLdd::CreateBuffer(TInt aLength)
69 { return DoControl(ECreateBuffer,(TAny*)aLength); }
70 inline TInt RTestLdd::MapInGlobalBuffer(TUint aProcessId,TAny*& aAddress,TUint32& aLength)
73 TInt r=DoControl(EMapInGlobalBuffer,&a,&aLength);
77 inline TInt RTestLdd::MapOutGlobalBuffer()
78 { return DoControl(EMapOutGlobalBuffer); }
79 inline TInt RTestLdd::DestroyGlobalBuffer()
80 { return DoControl(EDestroyGlobalBuffer); }
81 inline TInt RTestLdd::CreateBufferPhysAddr(TInt aLength)
82 { return DoControl(ECreateBufferPhysAddr,(TAny*)aLength); }
83 inline TInt RTestLdd::DestroyBufferPhysAddr()
84 { return DoControl(EDestroyBufferPhysAddr); }
85 inline TInt RTestLdd::MapInBuffer(TAny** aAddress,TUint32* aLength)
86 { return DoControl(EMapInBuffer,aAddress,aLength); }
87 inline TInt RTestLdd::MapOutBuffer()
88 { return DoControl(EMapOutBuffer); }
89 inline TInt RTestLdd::DestroyBuffer()
90 { return DoControl(EDestroyBuffer); }
91 inline TInt RTestLdd::CheckBuffer(TUint32 key)
92 { return DoControl(ECheckBuffer,(TAny*)key); }
93 inline TInt RTestLdd::FillBuffer(TUint32 key)
94 { return DoControl(EFillBuffer,(TAny*)key); }
95 inline TInt RTestLdd::ThreadRW(TDes8& aDes,TInt aThreadId)
96 { return DoControl(EThreadRW,(TAny*)&aDes,(TAny*)aThreadId); }