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