kernel/eka/include/d32ethernet.inl
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 // Copyright (c) 1995-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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // e32\include\d32ethernet.inl
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @publishedPartner
       
    21  @released
       
    22 */
       
    23 
       
    24 #ifndef __KLIB_H__
       
    25 _LIT(KRBusDevEthernet,"Ethernet");
       
    26 
       
    27 /**
       
    28 @capability CommDD
       
    29 */
       
    30 inline TInt RBusDevEthernet::Open(TInt aUnit)
       
    31 	{return(DoCreate(KRBusDevEthernet,VersionRequired(),aUnit,NULL,NULL));}
       
    32 
       
    33 inline TVersion RBusDevEthernet::VersionRequired() const
       
    34 	{return(TVersion(EMajorVersionNumber,EMinorVersionNumber,EBuildVersionNumber));}
       
    35 
       
    36 inline void RBusDevEthernet::Read(TRequestStatus &aStatus,TDes8 &aDes)
       
    37 	{TInt len=aDes.MaxLength();DoRequest(ERequestRead,aStatus,&aDes,&len);}
       
    38 
       
    39 inline void RBusDevEthernet::Read(TRequestStatus &aStatus,TDes8 &aDes,TInt aLength)
       
    40 	{DoRequest(ERequestRead,aStatus,&aDes,&aLength);}
       
    41 
       
    42 inline void RBusDevEthernet::ReadCancel()
       
    43 	{DoCancel(ERequestReadCancel);}
       
    44 
       
    45 inline void RBusDevEthernet::Write(TRequestStatus &aStatus,const TDesC8 &aDes)
       
    46 	{TInt len=aDes.Length();DoRequest(ERequestWrite,aStatus,(TAny *)&aDes,&len);}
       
    47 
       
    48 inline void RBusDevEthernet::Write(TRequestStatus &aStatus,const TDesC8 &aDes,TInt aLength)
       
    49 	{DoRequest(ERequestWrite,aStatus,(TAny *)&aDes,&aLength);}
       
    50 
       
    51 inline void RBusDevEthernet::WriteCancel()
       
    52 	{DoCancel(ERequestWriteCancel);}
       
    53 
       
    54 inline void RBusDevEthernet::Config(TDes8 &aConfig)
       
    55 	{DoControl(EControlConfig,&aConfig);}
       
    56 
       
    57 inline TInt RBusDevEthernet::SetConfig(const TDesC8 &aConfig)
       
    58 	{return(DoControl(EControlSetConfig,(TAny *)&aConfig));}
       
    59 
       
    60 inline TInt RBusDevEthernet::SetMAC(const TDesC8 &aConfig)
       
    61 	{return(DoControl(EControlSetMac,(TAny *)&aConfig));}
       
    62 
       
    63 inline void RBusDevEthernet::Caps(TDes8 &aCaps)
       
    64 	{DoControl(EControlCaps,&aCaps);}
       
    65 
       
    66 #ifdef ETH_CHIP_IO_ENABLED
       
    67 inline void RBusDevEthernet::ChipIOCtrl(TRequestStatus &aStatus,TPckgBuf<TChipIOInfo> &aDes)
       
    68     {DoRequest(EChipDiagIOCtrl,aStatus,(TAny *)&aDes);}
       
    69 #endif
       
    70 
       
    71 #endif