sl@0: // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32\include\d32ethernet.inl sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: sl@0: #ifndef __KLIB_H__ sl@0: _LIT(KRBusDevEthernet,"Ethernet"); sl@0: sl@0: /** sl@0: @capability CommDD sl@0: */ sl@0: inline TInt RBusDevEthernet::Open(TInt aUnit) sl@0: {return(DoCreate(KRBusDevEthernet,VersionRequired(),aUnit,NULL,NULL));} sl@0: sl@0: inline TVersion RBusDevEthernet::VersionRequired() const sl@0: {return(TVersion(EMajorVersionNumber,EMinorVersionNumber,EBuildVersionNumber));} sl@0: sl@0: inline void RBusDevEthernet::Read(TRequestStatus &aStatus,TDes8 &aDes) sl@0: {TInt len=aDes.MaxLength();DoRequest(ERequestRead,aStatus,&aDes,&len);} sl@0: sl@0: inline void RBusDevEthernet::Read(TRequestStatus &aStatus,TDes8 &aDes,TInt aLength) sl@0: {DoRequest(ERequestRead,aStatus,&aDes,&aLength);} sl@0: sl@0: inline void RBusDevEthernet::ReadCancel() sl@0: {DoCancel(ERequestReadCancel);} sl@0: sl@0: inline void RBusDevEthernet::Write(TRequestStatus &aStatus,const TDesC8 &aDes) sl@0: {TInt len=aDes.Length();DoRequest(ERequestWrite,aStatus,(TAny *)&aDes,&len);} sl@0: sl@0: inline void RBusDevEthernet::Write(TRequestStatus &aStatus,const TDesC8 &aDes,TInt aLength) sl@0: {DoRequest(ERequestWrite,aStatus,(TAny *)&aDes,&aLength);} sl@0: sl@0: inline void RBusDevEthernet::WriteCancel() sl@0: {DoCancel(ERequestWriteCancel);} sl@0: sl@0: inline void RBusDevEthernet::Config(TDes8 &aConfig) sl@0: {DoControl(EControlConfig,&aConfig);} sl@0: sl@0: inline TInt RBusDevEthernet::SetConfig(const TDesC8 &aConfig) sl@0: {return(DoControl(EControlSetConfig,(TAny *)&aConfig));} sl@0: sl@0: inline TInt RBusDevEthernet::SetMAC(const TDesC8 &aConfig) sl@0: {return(DoControl(EControlSetMac,(TAny *)&aConfig));} sl@0: sl@0: inline void RBusDevEthernet::Caps(TDes8 &aCaps) sl@0: {DoControl(EControlCaps,&aCaps);} sl@0: sl@0: #ifdef ETH_CHIP_IO_ENABLED sl@0: inline void RBusDevEthernet::ChipIOCtrl(TRequestStatus &aStatus,TPckgBuf &aDes) sl@0: {DoRequest(EChipDiagIOCtrl,aStatus,(TAny *)&aDes);} sl@0: #endif sl@0: sl@0: #endif