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.
sl@0
     1
// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// e32\include\drivers\pccard.inl
sl@0
    15
// 
sl@0
    16
// WARNING: This file contains some APIs which are internal and are subject
sl@0
    17
//          to change without noticed. Such APIs should therefore not be used
sl@0
    18
//          outside the Kernel and Hardware Services package.
sl@0
    19
//
sl@0
    20
sl@0
    21
// Class DPcCardSocket
sl@0
    22
inline TInt DPcCardSocket::CardFuncCount()
sl@0
    23
	{return(iCardFuncArray.Count());}
sl@0
    24
inline TBool DPcCardSocket::IsValidCardFunc(TInt aCardFunc)
sl@0
    25
	{return(aCardFunc<CardFuncCount());}
sl@0
    26
inline TBool DPcCardSocket::IsVerified()
sl@0
    27
	{return(CardFuncCount()>0);}
sl@0
    28
inline TBool DPcCardSocket::IsMultiFuncCard()
sl@0
    29
	{return(CardFuncCount()>1);}
sl@0
    30
sl@0
    31
// Class TPcCardFunction
sl@0
    32
inline void TPcCardFunction::SetConfigBaseAddr(TUint32 anAddr)
sl@0
    33
	{iConfigBaseAddr=anAddr;}
sl@0
    34
inline void TPcCardFunction::SetConfigRegMask(TInt aMask)
sl@0
    35
	{iConfigRegMask=aMask;}
sl@0
    36
inline void TPcCardFunction::SetFuncType(TPccdFuncType aType)
sl@0
    37
	{iFuncType=aType;}
sl@0
    38
inline TPccdFuncType TPcCardFunction::FuncType()
sl@0
    39
	{return(iFuncType);}
sl@0
    40
inline TInt TPcCardFunction::ConfigOption()
sl@0
    41
	{return(iConfigIndex);}
sl@0
    42
inline TBool TPcCardFunction::IsConfigured()
sl@0
    43
	{return(iConfigIndex!=KInvalidConfOpt);}
sl@0
    44
inline TBool TPcCardFunction::IsConfiguredByClient(DBase *aClientID)
sl@0
    45
	{return(IsConfigured()&&iClientID==aClientID);}
sl@0
    46
inline TBool TPcCardFunction::IsRestorableConfig()
sl@0
    47
	{return(iConfigFlags&KPccdConfigRestorable);}
sl@0
    48
inline TUint32 TPcCardFunction::InitCisOffset()
sl@0
    49
	{return(iInitCisOffset);}
sl@0
    50
inline TPccdMemType TPcCardFunction::InitCisMemType()
sl@0
    51
	{return(iInitCisMemType);}
sl@0
    52
sl@0
    53
// Class DPcCardVcc
sl@0
    54
inline void DPcCardVcc::SetVoltage(TPccdSocketVcc aVoltage)
sl@0
    55
	{iVoltageSetting=aVoltage;}
sl@0
    56
inline TPccdSocketVcc DPcCardVcc::VoltageSetting()
sl@0
    57
	{return(iVoltageSetting);}
sl@0
    58
sl@0
    59
// Class DPccdChunkBase
sl@0
    60
inline TUint32 DPccdChunkBase::BaseAddr()
sl@0
    61
	{return(iChnk.iMemBaseAddr);}
sl@0
    62
sl@0
    63
// Class RPccdWindow
sl@0
    64
inline TInt RPccdWindow::Read(TInt aPos,TAny *aPtr,TInt aLength)
sl@0
    65
	{return(iChunk->Read(aPos+iOffset,aPtr,aLength));}
sl@0
    66
inline TInt RPccdWindow::Write(TInt aPos,const TAny *aPtr,TInt aLength)
sl@0
    67
	{return(iChunk->Write(aPos+iOffset,aPtr,aLength));}
sl@0
    68
inline TInt RPccdWindow::ReadByteMultiple(TInt aPos,TAny *aPtr,TInt aCount)
sl@0
    69
	{return(iChunk->ReadByteMultiple(aPos+iOffset,aPtr,aCount));}
sl@0
    70
inline TInt RPccdWindow::WriteByteMultiple(TInt aPos,const TAny *aPtr,TInt aCount)
sl@0
    71
	{return(iChunk->WriteByteMultiple(aPos+iOffset,aPtr,aCount));}
sl@0
    72
inline TInt RPccdWindow::ReadHWordMultiple(TInt aPos,TAny *aPtr,TInt aCount)
sl@0
    73
	{return(iChunk->ReadHWordMultiple(aPos+iOffset,aPtr,aCount));}
sl@0
    74
inline TInt RPccdWindow::WriteHWordMultiple(TInt aPos,const TAny *aPtr,TInt aCount)
sl@0
    75
	{return(iChunk->WriteHWordMultiple(aPos+iOffset,aPtr,aCount));}
sl@0
    76
inline TUint RPccdWindow::Read8(TInt aPos)
sl@0
    77
	{return iChunk->Read8(aPos);}
sl@0
    78
inline void RPccdWindow::Write8(TInt aPos, TUint aValue)
sl@0
    79
	{iChunk->Write8(aPos,aValue);}
sl@0
    80
inline void RPccdWindow::SetAccessSpeed(TPccdAccessSpeed aSpeed)
sl@0
    81
	{iAccessSpeed=aSpeed;}
sl@0
    82
inline TBool RPccdWindow::IsPermanent()
sl@0
    83
	{return(iType&KPccdChunkPermanent);}
sl@0
    84
inline TBool RPccdWindow::IsShareable()
sl@0
    85
	{return(iType&KPccdChunkShared);}
sl@0
    86
inline TBool RPccdWindow::IsSystemOwned()
sl@0
    87
	{return(iType&KPccdChunkSystemOwned);}
sl@0
    88