os/boardsupport/haitest/bspsvs/suite/bsp/mmc/ldd/inc/d_mmcsdif.inl
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description:
sl@0
    15
*
sl@0
    16
*/
sl@0
    17
sl@0
    18
sl@0
    19
sl@0
    20
#ifndef __D_MMCSDIF_H__
sl@0
    21
#define __D_MMCSDIF_H__
sl@0
    22
sl@0
    23
sl@0
    24
sl@0
    25
inline TInt RMMCSDTestControllerInterface::TestDoControl(TTCFunctionId aFunctionId, TAny *a1, TAny *a2)
sl@0
    26
	{ return DoControl( aFunctionId.iValue, a1, a2); }
sl@0
    27
sl@0
    28
inline void RMMCSDTestControllerInterface::TestDoRequest(TTCFunctionId aFunctionId, TRequestStatus &aStatus, TAny *a1, TAny *a2)
sl@0
    29
	{ DoRequest( aFunctionId.iValue, aStatus, a1, a2); }
sl@0
    30
sl@0
    31
//DoRequests
sl@0
    32
inline void RMMCSDTestControllerInterface::ReadSector(TRequestStatus &aStatus, TInt aSectNum, TDes8 &aDes)
sl@0
    33
	{ TestDoRequest(TTCFunctionId(EReadSector, EMmcGeneralTest), aStatus, (TAny*)aSectNum, &aDes);}
sl@0
    34
sl@0
    35
inline void RMMCSDTestControllerInterface::WriteSector(TRequestStatus &aStatus,TInt aSectNum,const TDesC8 &aDes)
sl@0
    36
	{ TestDoRequest(TTCFunctionId(EWriteSector, EMmcGeneralTest), aStatus, (TAny*)aSectNum, (TAny*)&aDes);}
sl@0
    37
sl@0
    38
//General
sl@0
    39
inline TInt RMMCSDTestControllerInterface::ReadCSD(TCSDInfo& aCSDInfo)
sl@0
    40
	{return(TestDoControl(TTCFunctionId(EReadCSD, EMmcGeneralTest), &aCSDInfo));}
sl@0
    41
sl@0
    42
inline TInt RMMCSDTestControllerInterface::ReadExtCSD(TExtendedCSDInfo& aExtCSDInfo)
sl@0
    43
	{return(TestDoControl(TTCFunctionId(EReadExtCSD, EMmcGeneralTest), &aExtCSDInfo));}
sl@0
    44
sl@0
    45
inline TInt RMMCSDTestControllerInterface::CardInfo(TMMCCardInfo& aCardInfo)
sl@0
    46
	{return(TestDoControl(TTCFunctionId(ECardInfo, EMmcGeneralTest), &aCardInfo));}
sl@0
    47
sl@0
    48
inline TInt RMMCSDTestControllerInterface::Card(TAny* aCard)
sl@0
    49
	{return(TestDoControl(TTCFunctionId(ECard, EMmcGeneralTest), aCard));}
sl@0
    50
sl@0
    51
inline TInt RMMCSDTestControllerInterface::CardIsPresent(TBool& aIsPresent)
sl@0
    52
	{return(TestDoControl(TTCFunctionId(ECardIsPresent, EMmcGeneralTest), &aIsPresent));}
sl@0
    53
sl@0
    54
inline TInt RMMCSDTestControllerInterface::CardIsReady(TBool& aIsReady)
sl@0
    55
	{return(TestDoControl(TTCFunctionId(ECardIsReady, EMmcGeneralTest), &aIsReady));}
sl@0
    56
sl@0
    57
inline TInt RMMCSDTestControllerInterface::CardIsLocked(TBool& aIsLocked)
sl@0
    58
	{return(TestDoControl(TTCFunctionId(ECardIsLocked, EMmcGeneralTest), &aIsLocked));}
sl@0
    59
sl@0
    60
sl@0
    61
//Open Channel
sl@0
    62
inline TInt RMMCSDTestControllerInterface::Open(TInt aStack,const TVersion& aVer)
sl@0
    63
		{return(DoCreate(_L("MMCSDTestCtrlInf"),aVer,(TInt)aStack,NULL,NULL));}
sl@0
    64
sl@0
    65
inline TVersion RMMCSDTestControllerInterface::VersionRequired() const
sl@0
    66
	{return(TVersion(EMajorVersionNumber,EMinorVersionNumber,EBuildVersionNumber));}
sl@0
    67
sl@0
    68
//DMMCPsu
sl@0
    69
inline TInt RMMCSDTestControllerInterface::Psu(TAny* aPsu)
sl@0
    70
	{return(TestDoControl(TTCFunctionId(EPsu, EMmcTestPsu), aPsu));}
sl@0
    71
sl@0
    72
inline TInt RMMCSDTestControllerInterface::PsuInfo(TPBusPsuInf& anInfo)
sl@0
    73
	{return(TestDoControl(TTCFunctionId(EPsuInfo, EMmcTestPsu), &anInfo));}
sl@0
    74
sl@0
    75
inline TInt RMMCSDTestControllerInterface::SetPsuState(TInt& aState)
sl@0
    76
	{return(TestDoControl(TTCFunctionId(EPsuState, EMmcTestPsu), (TAny*)aState));}
sl@0
    77
sl@0
    78
inline TInt RMMCSDTestControllerInterface::SetPsuVoltage(TUint& aVol)
sl@0
    79
	{return(TestDoControl(TTCFunctionId(EPsuVoltage, EMmcTestPsu), (TAny*)aVol));}
sl@0
    80
sl@0
    81
inline TInt RMMCSDTestControllerInterface::PsuNumber(TInt& aPsuNum)
sl@0
    82
	{return(TestDoControl(TTCFunctionId(EPsuNum, EMmcTestPsu), &aPsuNum));}
sl@0
    83
sl@0
    84
inline TInt RMMCSDTestControllerInterface::MediaChangeID(TInt& aMCId)
sl@0
    85
	{return(TestDoControl(TTCFunctionId(EMediaChangeNum, EMmcTestPsu), &aMCId));}
sl@0
    86
sl@0
    87
inline TInt RMMCSDTestControllerInterface::PsuCurLimit(TBool& aSafe)
sl@0
    88
	{return(TestDoControl(TTCFunctionId(EPsuCurLimit, EMmcTestPsu), &aSafe));}
sl@0
    89
sl@0
    90
inline TInt RMMCSDTestControllerInterface::PbusState(TInt& aState)
sl@0
    91
	{return(TestDoControl(TTCFunctionId(EPbusState,EMmcTestPsu),&aState));}
sl@0
    92
sl@0
    93
inline TInt RMMCSDTestControllerInterface::VccState(TInt& aVccState)
sl@0
    94
	{return(TestDoControl(TTCFunctionId(EVccState,EMmcTestPsu),&aVccState));}
sl@0
    95
sl@0
    96
inline TInt RMMCSDTestControllerInterface::IsLocked(TBool& aState)
sl@0
    97
	{return(TestDoControl(TTCFunctionId(EIsLocked,EMmcTestPsu),&aState));}
sl@0
    98
sl@0
    99
inline TInt RMMCSDTestControllerInterface::IsOff(TBool& aState)
sl@0
   100
	{return(TestDoControl(TTCFunctionId(EIsOff,EMmcTestPsu),&aState));}
sl@0
   101
sl@0
   102
inline TInt RMMCSDTestControllerInterface::MaxCurrentInMicroAmps(TInt& aMaxCurrent)
sl@0
   103
	{return(TestDoControl(TTCFunctionId(EMaxCurrentInMicroAmps,EMmcTestPsu),&aMaxCurrent));}
sl@0
   104
sl@0
   105
inline TInt RMMCSDTestControllerInterface::ResetInactivityTimer()
sl@0
   106
	{return(TestDoControl(TTCFunctionId(EResetInactivityTimer,EMmcTestPsu),NULL));}
sl@0
   107
sl@0
   108
inline TInt RMMCSDTestControllerInterface::VoltageSupported(TUint& aVoltage)
sl@0
   109
	{return(TestDoControl(TTCFunctionId(EVoltageSupported,EMmcTestPsu),&aVoltage));}
sl@0
   110
sl@0
   111
inline TInt RMMCSDTestControllerInterface::InactivityCount(TInt& aInactivityCount)
sl@0
   112
	{return(TestDoControl(TTCFunctionId(EMemInactivityCount,EMmcTestPsu),&aInactivityCount));}
sl@0
   113
sl@0
   114
inline TInt RMMCSDTestControllerInterface::NotLockedCount(TInt& aNotLockedCount)
sl@0
   115
	{return(TestDoControl(TTCFunctionId(EMemNotLockedCount,EMmcTestPsu),&aNotLockedCount));}
sl@0
   116
sl@0
   117
inline TInt RMMCSDTestControllerInterface::InactivityTimeout(TInt& aInactivityTimeout)
sl@0
   118
	{return(TestDoControl(TTCFunctionId(EMemInactivityTimeout,EMmcTestPsu),&aInactivityTimeout));}
sl@0
   119
sl@0
   120
inline TInt RMMCSDTestControllerInterface::NotLockedTimeout(TInt& aNotLockedTimeout)
sl@0
   121
	{return(TestDoControl(TTCFunctionId(EMemNotLockedTimeout,EMmcTestPsu),&aNotLockedTimeout));}
sl@0
   122
sl@0
   123
inline TInt RMMCSDTestControllerInterface::MemVoltageSupported(TUint& aVoltage)
sl@0
   124
	{return(TestDoControl(TTCFunctionId(EMemVoltageSupported,EMmcTestPsu),&aVoltage));}
sl@0
   125
sl@0
   126
inline TInt RMMCSDTestControllerInterface::MemMaxCurrentInMicroAmps(TInt& aMaxCurrent)
sl@0
   127
	{return(TestDoControl(TTCFunctionId(EMemMaxCurrentInMicroAmps,EMmcTestPsu),&aMaxCurrent));}
sl@0
   128
sl@0
   129
inline TInt RMMCSDTestControllerInterface::VoltCheckInterval(TUint& aVoltCheckInterval)
sl@0
   130
	{return(TestDoControl(TTCFunctionId(EMemVoltCheckInterval,EMmcTestPsu),&aVoltCheckInterval));}
sl@0
   131
sl@0
   132
//DMMCMediaChange
sl@0
   133
inline TInt RMMCSDTestControllerInterface::MediaChange(TAny* aMediaChange)
sl@0
   134
	{return(TestDoControl(TTCFunctionId(EMediaChange, EMmcTestMediaChange), aMediaChange));}
sl@0
   135
sl@0
   136
inline TInt RMMCSDTestControllerInterface::MediaStateInfo(TInt& aMediaState)
sl@0
   137
	{return(TestDoControl(TTCFunctionId(EMediaStateInfo, EMmcTestMediaChange), &aMediaState));}
sl@0
   138
sl@0
   139
inline TInt RMMCSDTestControllerInterface::ForceMediaChange()
sl@0
   140
	{return(TestDoControl(TTCFunctionId(EForceMediaChange, EMmcTestMediaChange), NULL));}
sl@0
   141
sl@0
   142
inline TInt RMMCSDTestControllerInterface::MediaChangeCounter(TInt& aCounter)
sl@0
   143
	{return(TestDoControl(TTCFunctionId(EMediaChangeCounter, EMmcTestMediaChange), &aCounter));}
sl@0
   144
sl@0
   145
// DMMCSocket
sl@0
   146
inline TInt RMMCSDTestControllerInterface::Socket(TAny* aSocket)
sl@0
   147
	{return(TestDoControl(TTCFunctionId(ESocket, EMmcTestSocket), aSocket));}
sl@0
   148
sl@0
   149
inline TInt RMMCSDTestControllerInterface::SocketAdjustPartialRead(TPartialReadData& aPartialReadData)
sl@0
   150
	{return(TestDoControl(TTCFunctionId(ESocketAdjustPartialRead, EMmcTestSocket), &aPartialReadData));}
sl@0
   151
sl@0
   152
inline TInt RMMCSDTestControllerInterface::SocketCardIsPresent(TInt& aCardPresent)
sl@0
   153
	{return(TestDoControl(TTCFunctionId(ESocketCardIsPresent, EMmcTestSocket), &aCardPresent));}
sl@0
   154
sl@0
   155
inline TInt RMMCSDTestControllerInterface::SocketGetBufferInfo(TBufferInfo& aBufferInfo)
sl@0
   156
	{return(TestDoControl(TTCFunctionId(ESocketGetBufferInfo, EMmcTestSocket), &aBufferInfo));}
sl@0
   157
sl@0
   158
inline TInt RMMCSDTestControllerInterface::SocketInit()
sl@0
   159
	{return(TestDoControl(TTCFunctionId(ESocketInit, EMmcTestSocket), NULL ));}
sl@0
   160
sl@0
   161
inline TInt RMMCSDTestControllerInterface::SocketInitiatePowerUpSequence()
sl@0
   162
	{return(TestDoControl(TTCFunctionId(ESocketInitiatePowerUpSequence, EMmcTestSocket), NULL));}
sl@0
   163
sl@0
   164
inline TInt RMMCSDTestControllerInterface::SocketMachineInfo(TMachineInfo& aMachineInfo)
sl@0
   165
	{return(TestDoControl(TTCFunctionId(ESocketMachineInfo, EMmcTestSocket), &aMachineInfo));}
sl@0
   166
sl@0
   167
inline TInt RMMCSDTestControllerInterface::SocketPrepareStore(TPasswordPrepareStoreData& aPwdData)
sl@0
   168
	{return(TestDoControl(TTCFunctionId(ESocketPrepareStore,  EMmcTestSocket),&aPwdData));}
sl@0
   169
sl@0
   170
inline TInt RMMCSDTestControllerInterface::SocketReset1()
sl@0
   171
	{return(TestDoControl(TTCFunctionId(ESocketReset1, EMmcTestSocket), NULL ));}
sl@0
   172
sl@0
   173
inline TInt RMMCSDTestControllerInterface::SocketReset2()
sl@0
   174
	{return(TestDoControl(TTCFunctionId(ESocketReset2, EMmcTestSocket), NULL));}
sl@0
   175
sl@0
   176
inline TInt RMMCSDTestControllerInterface::SocketResetInactivity(TInt aBusNumber)
sl@0
   177
	{return(TestDoControl(TTCFunctionId(ESocketResetInactivity, EMmcTestSocket), &aBusNumber));}
sl@0
   178
sl@0
   179
inline TInt RMMCSDTestControllerInterface::SocketStack(TStackPtr& aStackPtr)
sl@0
   180
	{return(TestDoControl(TTCFunctionId(ESocketStack, EMmcTestSocket), &aStackPtr));}
sl@0
   181
sl@0
   182
inline TInt RMMCSDTestControllerInterface::SocketiState_Get(TBusState& aState)
sl@0
   183
	{return(TestDoControl(TTCFunctionId(ESocketiState_Get, EMmcTestSocket), &aState));}
sl@0
   184
sl@0
   185
inline TInt RMMCSDTestControllerInterface::SocketiDoorOpened_Get(TBool& aDoorOpened)
sl@0
   186
	{return(TestDoControl(TTCFunctionId(ESocketiDoorOpened_Get, EMmcTestSocket), &aDoorOpened));}
sl@0
   187
sl@0
   188
inline TInt RMMCSDTestControllerInterface::SocketiStandby_Get(TBool& aStandby)
sl@0
   189
	{return(TestDoControl(TTCFunctionId(ESocketiStandby_Get, EMmcTestSocket), &aStandby));}
sl@0
   190
sl@0
   191
inline TInt RMMCSDTestControllerInterface::SocketiType_Get(TCardBusType& aType)
sl@0
   192
	{return(TestDoControl(TTCFunctionId(ESocketiType_Get, EMmcTestSocket), &aType));}
sl@0
   193
sl@0
   194
inline void RMMCSDTestControllerInterface::SocketPowerUp(TRequestStatus& aStatus)
sl@0
   195
	{ TestDoRequest(TTCFunctionId(ESocketPowerUp, EMmcTestSocket), aStatus); }
sl@0
   196
sl@0
   197
// DMMCStack
sl@0
   198
inline TInt RMMCSDTestControllerInterface::Stack(TAny* aStack)
sl@0
   199
	{ return(TestDoControl(TTCFunctionId(EStack, EMmcTestStack), aStack));}
sl@0
   200
sl@0
   201
inline TInt RMMCSDTestControllerInterface::StackAdjustPartialRead(TPartialReadData& aPartialReadData)
sl@0
   202
	{ return(TestDoControl(TTCFunctionId(EStackAdjustPartialRead, EMmcTestStack), &aPartialReadData));}
sl@0
   203
sl@0
   204
inline TInt RMMCSDTestControllerInterface::StackAllocSession()
sl@0
   205
	{ return(TestDoControl(TTCFunctionId(EStackAllocSession, EMmcTestStack), NULL));}
sl@0
   206
sl@0
   207
inline TInt RMMCSDTestControllerInterface::StackBufferInfo(TBufferInfo& aBufferInfo)
sl@0
   208
	{ return(TestDoControl(TTCFunctionId(EStackBufferInfo, EMmcTestStack), &aBufferInfo));}
sl@0
   209
sl@0
   210
inline TInt RMMCSDTestControllerInterface::StackGetBufferInfo(TBufferInfo& aBufferInfo)
sl@0
   211
	{ return(TestDoControl(TTCFunctionId(EStackGetBufferInfo, EMmcTestStack), &aBufferInfo));}
sl@0
   212
sl@0
   213
inline TInt RMMCSDTestControllerInterface::StackCardP(TCardPtr& aCardPtr)
sl@0
   214
	{ return(TestDoControl( TTCFunctionId(EStackCardP, EMmcTestStack), &aCardPtr));}
sl@0
   215
sl@0
   216
inline TInt RMMCSDTestControllerInterface::StackStop()
sl@0
   217
	{ return(TestDoControl(TTCFunctionId(EStackStop, EMmcTestStack), NULL));}
sl@0
   218
sl@0
   219
inline TInt RMMCSDTestControllerInterface::StackMaxCardsInStack(TUint& aNumCardsInStack)
sl@0
   220
	{ return(TestDoControl(TTCFunctionId(EStackMaxCardsInStack, EMmcTestStack), &aNumCardsInStack));}
sl@0
   221
sl@0
   222
inline TInt RMMCSDTestControllerInterface::StackMMCSocket(TAny* aAny)
sl@0
   223
	{ return(TestDoControl(TTCFunctionId(EStackMMCSocket, EMmcTestStack), aAny));}
sl@0
   224
sl@0
   225
inline TInt RMMCSDTestControllerInterface::StackReadPasswordStore(TStackPasswordStoreData& aPwdStoreData)
sl@0
   226
	{ return(TestDoControl(TTCFunctionId(EStackReadPasswordStore, EMmcTestStack), &aPwdStoreData));}
sl@0
   227
sl@0
   228
inline TInt RMMCSDTestControllerInterface::StackWritePasswordStore(TStackPasswordStoreData& aPwdStoreData)
sl@0
   229
	{ return(TestDoControl(TTCFunctionId(EStackWritePasswordStore, EMmcTestStack), &aPwdStoreData));}
sl@0
   230
sl@0
   231
inline TInt RMMCSDTestControllerInterface::StackProgramPeriodInMilliSeconds(TInt& aPeriodMs)
sl@0
   232
	{ return(TestDoControl(TTCFunctionId(EStackProgramPeriodInMs, EMmcTestStack), &aPeriodMs));}
sl@0
   233
sl@0
   234
inline TInt RMMCSDTestControllerInterface::StackInitStackInProgress(TBool& aInProgress)
sl@0
   235
	{ return(TestDoControl(TTCFunctionId(EStackInitStackInProgress, EMmcTestStack), &aInProgress));}
sl@0
   236
sl@0
   237
inline TInt RMMCSDTestControllerInterface::StackHasSessionsQueued(TBool& aSessionsQueued)
sl@0
   238
	{ return(TestDoControl(TTCFunctionId(EStackHasSessionsQueued, EMmcTestStack), &aSessionsQueued));}
sl@0
   239
sl@0
   240
inline TInt RMMCSDTestControllerInterface::StackHasCardsPresent(TBool& aCardsPresent)
sl@0
   241
	{ return(TestDoControl(TTCFunctionId(EStackHasCardsPresent, EMmcTestStack), &aCardsPresent));}
sl@0
   242
sl@0
   243
inline TInt RMMCSDTestControllerInterface::StackMachineInfo(TMachineInfo& aMachineInfo)
sl@0
   244
	{ return(TestDoControl(TTCFunctionId(EStackMachineInfo, EMmcTestStack), &aMachineInfo));}
sl@0
   245
sl@0
   246
inline TInt RMMCSDTestControllerInterface::StackDemandPagingInfo(TTCDemandPagingInfo& aInfo)
sl@0
   247
	{ return TestDoControl(TTCFunctionId(EStackDemandPagingInfo, EMmcTestStack), &aInfo); }
sl@0
   248
sl@0
   249
inline TInt RMMCSDTestControllerInterface::StackEffectiveModes(TUint32& aModes)
sl@0
   250
	{ return TestDoControl(TTCFunctionId(EStackEffectiveModes, EMmcTestStack), &aModes);}
sl@0
   251
sl@0
   252
inline TInt RMMCSDTestControllerInterface::StackInit()
sl@0
   253
	{ return TestDoControl(TTCFunctionId(EStackInit, EMmcTestStack));}
sl@0
   254
sl@0
   255
inline TInt RMMCSDTestControllerInterface::StackReportPowerUp()
sl@0
   256
	{ return TestDoControl(TTCFunctionId(EStackReportPowerUp, EMmcTestStack));}
sl@0
   257
sl@0
   258
inline TInt RMMCSDTestControllerInterface::StackReportPowerDown()
sl@0
   259
	{ return TestDoControl(TTCFunctionId(EStackReportPowerDown, EMmcTestStack));}
sl@0
   260
sl@0
   261
inline TInt RMMCSDTestControllerInterface::StackAlterEffectiveModes(TEffectiveModesFunctionId aFunctionId, TAny* aData)
sl@0
   262
	{
sl@0
   263
	return TestDoControl(TTCFunctionId(EStackConfigureEffectiveModes, EMmcTestStack), (TAny*)aFunctionId, aData); 
sl@0
   264
	}
sl@0
   265
sl@0
   266
#endif //__D_MMCSDIF_H__