os/kernelhwsrv/kernel/eka/include/drivers/pccard.inl
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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\drivers\pccard.inl
    15 // 
    16 // WARNING: This file contains some APIs which are internal and are subject
    17 //          to change without noticed. Such APIs should therefore not be used
    18 //          outside the Kernel and Hardware Services package.
    19 //
    20 
    21 // Class DPcCardSocket
    22 inline TInt DPcCardSocket::CardFuncCount()
    23 	{return(iCardFuncArray.Count());}
    24 inline TBool DPcCardSocket::IsValidCardFunc(TInt aCardFunc)
    25 	{return(aCardFunc<CardFuncCount());}
    26 inline TBool DPcCardSocket::IsVerified()
    27 	{return(CardFuncCount()>0);}
    28 inline TBool DPcCardSocket::IsMultiFuncCard()
    29 	{return(CardFuncCount()>1);}
    30 
    31 // Class TPcCardFunction
    32 inline void TPcCardFunction::SetConfigBaseAddr(TUint32 anAddr)
    33 	{iConfigBaseAddr=anAddr;}
    34 inline void TPcCardFunction::SetConfigRegMask(TInt aMask)
    35 	{iConfigRegMask=aMask;}
    36 inline void TPcCardFunction::SetFuncType(TPccdFuncType aType)
    37 	{iFuncType=aType;}
    38 inline TPccdFuncType TPcCardFunction::FuncType()
    39 	{return(iFuncType);}
    40 inline TInt TPcCardFunction::ConfigOption()
    41 	{return(iConfigIndex);}
    42 inline TBool TPcCardFunction::IsConfigured()
    43 	{return(iConfigIndex!=KInvalidConfOpt);}
    44 inline TBool TPcCardFunction::IsConfiguredByClient(DBase *aClientID)
    45 	{return(IsConfigured()&&iClientID==aClientID);}
    46 inline TBool TPcCardFunction::IsRestorableConfig()
    47 	{return(iConfigFlags&KPccdConfigRestorable);}
    48 inline TUint32 TPcCardFunction::InitCisOffset()
    49 	{return(iInitCisOffset);}
    50 inline TPccdMemType TPcCardFunction::InitCisMemType()
    51 	{return(iInitCisMemType);}
    52 
    53 // Class DPcCardVcc
    54 inline void DPcCardVcc::SetVoltage(TPccdSocketVcc aVoltage)
    55 	{iVoltageSetting=aVoltage;}
    56 inline TPccdSocketVcc DPcCardVcc::VoltageSetting()
    57 	{return(iVoltageSetting);}
    58 
    59 // Class DPccdChunkBase
    60 inline TUint32 DPccdChunkBase::BaseAddr()
    61 	{return(iChnk.iMemBaseAddr);}
    62 
    63 // Class RPccdWindow
    64 inline TInt RPccdWindow::Read(TInt aPos,TAny *aPtr,TInt aLength)
    65 	{return(iChunk->Read(aPos+iOffset,aPtr,aLength));}
    66 inline TInt RPccdWindow::Write(TInt aPos,const TAny *aPtr,TInt aLength)
    67 	{return(iChunk->Write(aPos+iOffset,aPtr,aLength));}
    68 inline TInt RPccdWindow::ReadByteMultiple(TInt aPos,TAny *aPtr,TInt aCount)
    69 	{return(iChunk->ReadByteMultiple(aPos+iOffset,aPtr,aCount));}
    70 inline TInt RPccdWindow::WriteByteMultiple(TInt aPos,const TAny *aPtr,TInt aCount)
    71 	{return(iChunk->WriteByteMultiple(aPos+iOffset,aPtr,aCount));}
    72 inline TInt RPccdWindow::ReadHWordMultiple(TInt aPos,TAny *aPtr,TInt aCount)
    73 	{return(iChunk->ReadHWordMultiple(aPos+iOffset,aPtr,aCount));}
    74 inline TInt RPccdWindow::WriteHWordMultiple(TInt aPos,const TAny *aPtr,TInt aCount)
    75 	{return(iChunk->WriteHWordMultiple(aPos+iOffset,aPtr,aCount));}
    76 inline TUint RPccdWindow::Read8(TInt aPos)
    77 	{return iChunk->Read8(aPos);}
    78 inline void RPccdWindow::Write8(TInt aPos, TUint aValue)
    79 	{iChunk->Write8(aPos,aValue);}
    80 inline void RPccdWindow::SetAccessSpeed(TPccdAccessSpeed aSpeed)
    81 	{iAccessSpeed=aSpeed;}
    82 inline TBool RPccdWindow::IsPermanent()
    83 	{return(iType&KPccdChunkPermanent);}
    84 inline TBool RPccdWindow::IsShareable()
    85 	{return(iType&KPccdChunkShared);}
    86 inline TBool RPccdWindow::IsSystemOwned()
    87 	{return(iType&KPccdChunkSystemOwned);}
    88