Update contrib.
1 // Copyright (c) 1994-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\d32fir.h
31 enum chan{KReadChannel,KWriteChannel};
45 typedef TPckgBuf<TFirConfigV01> TFirConfig;
47 const TUint KCapsFirBps576000 =0x00080000;
48 const TUint KCapsFirBps1152000=0x00100000;
49 const TUint KCapsFirBps4000000=0x00200000;
56 typedef TPckgBuf<TFirCapsV01> TFirCaps;
58 _LIT(KRDevFir,"Fastir");
60 class RDevFir : public RBusLogicalChannel
72 // 0 to 3 (ie KMaxRequests)
73 EWriteReq=0x0,EWriteReqCancel=0x1,
74 EReadReq =0x1,EReadReqCancel =0x2,
98 #ifndef __KERNEL_MODE__
99 inline TInt Open(TInt aUnit=KNullUnit)
100 {return DoCreate(KRDevFir,VersionRequired(),aUnit,NULL,NULL);}
102 inline void Write(TRequestStatus& aStatus, TDesC8& aDes, TInt aSize)
103 {DoRequest(EWriteReq,aStatus,(TAny *)&aDes,(TAny *)&aSize);}
105 inline void Read(TRequestStatus& aStatus, TDes8& aDes, TInt aSize)
106 {DoRequest(EReadReq,aStatus,(TAny *)&aDes,(TAny *)&aSize);}
108 inline void WriteCancel()
109 {DoCancel(EWriteReqCancel);}
111 inline void ReadCancel()
112 {DoCancel(EReadReqCancel);}
115 inline TInt Config(TDes8& aConfig)
116 {return DoControl(KControlConfig,(TAny *)&aConfig);}
118 inline TInt SetConfig(const TDes8& aConfig)
119 {return DoControl(KControlSetConfig,(TAny *)&aConfig);}
121 inline TInt Caps(TDes8& aCaps)
122 {return DoControl(KControlCaps,(TAny *)&aCaps);}
124 inline TInt FlushBuffers()
125 {return DoControl(KFlushBuffers);}
127 inline TInt SetRange(TUint aPercentage)
128 {return DoControl(KSetRange,(TAny *)&aPercentage);}
130 inline TVersion VersionRequired() const
131 {return TVersion(EMajorVersion,EMinorVersion,EBuildVersion);}
134 inline void DebugWrite(TDes8& aDes)
135 {TInt len=aDes.Length();DoControl(KDebugWrite,(TAny *)&aDes,(TAny *)&(len));}
139 #endif // __FIRCOMM_H__