haitest/bspsvs/suite/bsp/mmc/src/T_MmcSDPsuBaseDriverData.cpp
changeset 0 cec860690d41
equal deleted inserted replaced
-1:000000000000 0:cec860690d41
       
     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 #include "T_MmcSDPsuBaseDriverData.h"
       
    19 
       
    20 //MMCSD Commands index
       
    21 /*@{*/
       
    22 
       
    23 _LIT(KCmdIsLocked,							"IsLocked");
       
    24 _LIT(KCmdIsOff,								"IsOff");
       
    25 _LIT(KCmdMaxCurrentInMicroAmps,				"MaxCurrentInMicroAmps");
       
    26 _LIT(KCmdResetInactivityTimer,				"ResetInactivityTimer");
       
    27 _LIT(KCmdVoltageSupported,					"VoltageSupported");
       
    28 _LIT(KCmdInactivityCount,					"InactivityCount");
       
    29 _LIT(KCmdNotLockedCount,					"NotLockedCount");
       
    30 _LIT(KCmdInactivityTimeout,					"InactivityTimeout");
       
    31 _LIT(KCmdNotLockedTimeout,					"NotLockedTimeout");
       
    32 _LIT(KCmdMemVoltageSupported,				"MemVoltageSupported");
       
    33 _LIT(KCmdMemMaxCurrentInMicroAmps,			"MemMaxCurrentInMicroAmps");
       
    34 _LIT(KCmdVoltCheckInterval,					"VoltCheckInterval");
       
    35 
       
    36 
       
    37 _LIT(KExpectedLockState,					"expectedlockstate");
       
    38 _LIT(KExpectedPsuState,						"expectedpsustate");
       
    39 _LIT(KExpectedCurrent,						"expectedcurrent");
       
    40 _LIT(KExpectedVoltage,						"expectedvoltage");
       
    41 _LIT(KExpectedInactivityCount,				"expectedinactivityCount");
       
    42 _LIT(KExpectedNotLockedCount,				"expectednotLockedCount");
       
    43 _LIT(KExpectedInactivityTimeout,			"expectedinactivityTimeout");
       
    44 _LIT(KExpectedNotLockedTimeout,				"expectednotlockedtimeOut");
       
    45 _LIT(KExpectedMemVoltageSupported,			"expectedmemVoltageSupported");
       
    46 _LIT(KExpectedMemMaxCurrentInMicroAmps,		"expectedmemMaxCurrentInMicroAmps");
       
    47 _LIT(KExpectedVoltageinterval,				"expectedvoltageinterval");
       
    48 
       
    49 /*@}*/
       
    50 
       
    51 //////////////////////////////////////////////////////////////////////
       
    52 // Construction/Destruction
       
    53 //////////////////////////////////////////////////////////////////////
       
    54 
       
    55 CT_MMCSDPsuBaseDriverData* CT_MMCSDPsuBaseDriverData::NewL()
       
    56 	{
       
    57 	CT_MMCSDPsuBaseDriverData*	ret=new (ELeave) CT_MMCSDPsuBaseDriverData();
       
    58 	CleanupStack::PushL(ret);
       
    59 	ret->ConstructL();
       
    60 	CleanupStack::Pop(ret);
       
    61 	return ret;
       
    62 	}
       
    63 
       
    64 
       
    65 CT_MMCSDPsuBaseDriverData::CT_MMCSDPsuBaseDriverData()
       
    66 :	CT_MmcSDDriverData()
       
    67 ,	iAsyncErrorIndex(0)
       
    68 	{
       
    69 	}
       
    70 
       
    71 void CT_MMCSDPsuBaseDriverData::ConstructL()
       
    72 /**
       
    73  * Second phase construction
       
    74  *
       
    75  * @internalComponent
       
    76  *
       
    77  * @return	N/A
       
    78  *
       
    79  * @pre		None
       
    80  * @post	None
       
    81  *
       
    82  * @leave	system wide error
       
    83  */
       
    84 	{
       
    85 	CT_MmcSDDriverData::ConstructL();
       
    86 	}
       
    87 
       
    88 CT_MMCSDPsuBaseDriverData::~CT_MMCSDPsuBaseDriverData()
       
    89 /**
       
    90  * Public destructor
       
    91  */
       
    92 	{
       
    93 	}
       
    94 
       
    95 TBool CT_MMCSDPsuBaseDriverData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
       
    96 /**
       
    97  * Process a command read from the ini file
       
    98  *
       
    99  * @param aCommand			The command to process
       
   100  * @param aSection			The section in the ini containing data for the command
       
   101  * @param aAsyncErrorIndex	Command index for async calls to return errors to
       
   102  *
       
   103  * @return					ETrue if the command is processed
       
   104  *
       
   105  * @leave					System wide error
       
   106  */
       
   107  	{
       
   108 	TBool	ret=ETrue;
       
   109 
       
   110 	if ( aCommand==KCmdIsLocked )
       
   111 		{
       
   112 		DoCmdIsLocked(aSection);
       
   113 		}
       
   114 	else if ( aCommand==KCmdIsOff )
       
   115 		{
       
   116 		DoCmdIsOff(aSection);
       
   117 		}
       
   118 	else if ( aCommand==KCmdMaxCurrentInMicroAmps )
       
   119 		{
       
   120 		DoCmdMaxCurrentInMicroAmps(aSection);
       
   121 		}
       
   122 	else if ( aCommand==KCmdResetInactivityTimer )
       
   123 		{
       
   124 		DoCmdResetInactivityTimer();
       
   125 		}
       
   126 	else if ( aCommand==KCmdVoltageSupported)
       
   127 		{
       
   128 		DoCmdVoltageSupported(aSection);
       
   129 		}
       
   130 	else if ( aCommand==KCmdInactivityCount)
       
   131 		{
       
   132 		DoCmdInactivityCount(aSection);
       
   133 		}
       
   134 	else if ( aCommand==KCmdNotLockedCount)
       
   135 		{
       
   136 		DoCmdNotLockedCount(aSection);
       
   137 		}
       
   138 	else if ( aCommand==KCmdInactivityTimeout)
       
   139 		{
       
   140 		DoCmdInactivityTimeout(aSection);
       
   141 		}
       
   142 	else if ( aCommand==KCmdNotLockedTimeout)
       
   143 		{
       
   144 		DoCmdNotLockedTimeout(aSection);
       
   145 		}
       
   146 	else if ( aCommand==KCmdMemVoltageSupported)
       
   147 		{
       
   148 		DoCmdMemVoltageSupported(aSection);
       
   149 		}
       
   150 	else if ( aCommand==KCmdMemMaxCurrentInMicroAmps)
       
   151 		{
       
   152 		DoCmdMemMaxCurrentInMicroAmps(aSection);
       
   153 		}
       
   154 	else if ( aCommand==KCmdVoltCheckInterval)
       
   155 		{
       
   156 		DoCmdVoltCheckInterval(aSection);
       
   157 		}
       
   158 	else
       
   159 		{
       
   160 		ret=CT_MmcSDDriverData::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
       
   161 		}
       
   162 	return ret;
       
   163 	}
       
   164 
       
   165 /**
       
   166  * Checks whether this PSU is powering a bus containing a locked device
       
   167  * i.e. one that is recognised and in use by a client
       
   168  *
       
   169  * @param aSection			The section in the ini containing data for the command
       
   170  *
       
   171  * @return					void
       
   172  *
       
   173  * @leave					System wide error
       
   174  */
       
   175 void CT_MMCSDPsuBaseDriverData::DoCmdIsLocked(const TDesC& aSection)
       
   176 	{
       
   177  	TInt err;
       
   178  	TBool lockstate;
       
   179  	err = iMmcSDController->IsLocked(lockstate);
       
   180 	if ( err!=KErrNone )
       
   181 		{
       
   182 		ERR_PRINTF2(_L("Getting Lock Information Error %d"), err);
       
   183 		SetError(err);
       
   184 		}
       
   185 	else
       
   186 		{
       
   187 		//IsLocked?
       
   188 		INFO_PRINTF2(_L("PSUBASE: IsLocked    = %d \n"),lockstate);
       
   189 		TBool	expectedlockstate;
       
   190 		if(GetBoolFromConfig(aSection, KExpectedLockState(), expectedlockstate))
       
   191 			{
       
   192 			if(lockstate != expectedlockstate)
       
   193 				{
       
   194 				SetBlockResult(EFail);
       
   195 				ERR_PRINTF3(_L("lockstate(%d) != expectedlockstate(%d)"), lockstate, expectedlockstate);
       
   196 				}
       
   197 			}
       
   198 		else
       
   199 			{
       
   200 			SetBlockResult(EFail);
       
   201 			WARN_PRINTF1(_L("expectedlockstate Value Missing From INI File"));
       
   202 			}
       
   203 		}
       
   204 	}
       
   205 
       
   206 /**
       
   207  * Checks whether the PSU is off
       
   208  *
       
   209  * @param aSection			The section in the ini containing data for the command
       
   210  *
       
   211  * @return					void
       
   212  *
       
   213  * @leave					System wide error
       
   214  */
       
   215 void CT_MMCSDPsuBaseDriverData::DoCmdIsOff(const TDesC& aSection)
       
   216 	{
       
   217  	TInt err;
       
   218  	TBool psustate;
       
   219  	err = iMmcSDController->IsOff(psustate);
       
   220 	if ( err!=KErrNone )
       
   221 		{
       
   222 		ERR_PRINTF2(_L("Getting PSU State Information Error %d"), err);
       
   223 		SetError(err);
       
   224 		}
       
   225 	else
       
   226 		{
       
   227 		//IsLocked?
       
   228 		INFO_PRINTF2(_L("PSUBASE: IsOff    = %d \n"),psustate);
       
   229 		TBool	expectedpsustate;
       
   230 		if(GetBoolFromConfig(aSection, KExpectedPsuState(), expectedpsustate))
       
   231 			{
       
   232 			if(psustate != expectedpsustate)
       
   233 				{
       
   234 				SetBlockResult(EFail);
       
   235 				ERR_PRINTF3(_L("psustate(%d) != expectedpsustate(%d)"), psustate, expectedpsustate);
       
   236 				}
       
   237 			}
       
   238 		else
       
   239 			{
       
   240 			SetBlockResult(EFail);
       
   241 			WARN_PRINTF1(_L("expectedpsustate Value Missing From INI File"));
       
   242 			}
       
   243 		}
       
   244 	}
       
   245 
       
   246 /**
       
   247  * Gets the maximum current (in microAmps) that the PSU is able to supply
       
   248  *
       
   249  * @param aSection			The section in the ini containing data for the command
       
   250  *
       
   251  * @return					void
       
   252  *
       
   253  * @leave					System wide error
       
   254  */
       
   255 void CT_MMCSDPsuBaseDriverData::DoCmdMaxCurrentInMicroAmps(const TDesC& aSection)
       
   256 	{
       
   257  	TInt err;
       
   258  	TInt current;
       
   259  	err = iMmcSDController->MaxCurrentInMicroAmps(current);
       
   260 	if ( err!=KErrNone )
       
   261 		{
       
   262 		ERR_PRINTF2(_L("Getting MaxCurrentInMicroAmps Error %d"), err);
       
   263 		SetError(err);
       
   264 		}
       
   265 	else
       
   266 		{
       
   267 		//MaxCurrentInMicroAmps
       
   268 		INFO_PRINTF2(_L("PSUBASE: MaxCurrentInMicroAmps   = %d \n"),current);
       
   269 		TInt	expectedcurrent;
       
   270 		if(GetIntFromConfig(aSection, KExpectedCurrent(), expectedcurrent))
       
   271 			{
       
   272 			if(current != expectedcurrent)
       
   273 				{
       
   274 				SetBlockResult(EFail);
       
   275 				ERR_PRINTF3(_L("current(%d) != expectedcurrent(%d)"), current, expectedcurrent);
       
   276 				}
       
   277 			}
       
   278 		else
       
   279 			{
       
   280 			SetBlockResult(EFail);
       
   281 			WARN_PRINTF1(_L("expectedcurrent Value Missing From INI File"));
       
   282 			}
       
   283 		}
       
   284 	}
       
   285 
       
   286 /**
       
   287  * Resets inactivity and not-locked counts
       
   288  *
       
   289  * @return					void
       
   290  *
       
   291  * @leave					System wide error
       
   292  */
       
   293 void CT_MMCSDPsuBaseDriverData::DoCmdResetInactivityTimer()
       
   294 	{
       
   295  	TInt err;
       
   296  	err = iMmcSDController->ResetInactivityTimer();
       
   297 	if ( err!=KErrNone )
       
   298 		{
       
   299 		ERR_PRINTF2(_L("ResetInactivityTimer Error %d"), err);
       
   300 		SetError(err);
       
   301 		}
       
   302 	}
       
   303 
       
   304 /**
       
   305  * Gets the voltage level, or range of supported voltage levels
       
   306  *
       
   307  * @param aSection			The section in the ini containing data for the command
       
   308  *
       
   309  * @return					void
       
   310  *
       
   311  * @leave					System wide error
       
   312  */
       
   313 void CT_MMCSDPsuBaseDriverData::DoCmdVoltageSupported(const TDesC& aSection)
       
   314 	{
       
   315  	TInt err;
       
   316  	TUint volt;
       
   317  	err = iMmcSDController->VoltageSupported(volt);
       
   318 	if ( err!=KErrNone )
       
   319 		{
       
   320 		ERR_PRINTF2(_L("VoltageSupported Error %d"), err);
       
   321 		SetError(err);
       
   322 		}
       
   323 	else
       
   324 		{
       
   325 		//VoltageSupported
       
   326 		INFO_PRINTF2(_L("PSUBASE: VoltageSupported  = %x \n"),volt);
       
   327 		TUint	expectedvolt;
       
   328 		if(GetUintFromConfig(aSection, KExpectedVoltage(), expectedvolt))
       
   329 			{
       
   330 			if(volt != expectedvolt)
       
   331 				{
       
   332 				SetBlockResult(EFail);
       
   333 				ERR_PRINTF3(_L("volt(%x) != expectedvolt(%x)"), volt, expectedvolt);
       
   334 				}
       
   335 			}
       
   336 		else
       
   337 			{
       
   338 			SetBlockResult(EFail);
       
   339 			WARN_PRINTF1(_L("expectedvolt Value Missing From INI File"));
       
   340 			}
       
   341 		}
       
   342 	}
       
   343 
       
   344 /**
       
   345  * Bus inactivity counter
       
   346  *
       
   347  * @param aSection			The section in the ini containing data for the command
       
   348  *
       
   349  * @return					void
       
   350  *
       
   351  * @leave					System wide error
       
   352  */
       
   353 void CT_MMCSDPsuBaseDriverData::DoCmdInactivityCount(const TDesC& aSection)
       
   354 	{
       
   355  	TInt err;
       
   356  	TInt inactivityCount;
       
   357  	err = iMmcSDController->InactivityCount(inactivityCount);
       
   358 	if ( err!=KErrNone )
       
   359 		{
       
   360 		ERR_PRINTF2(_L("InactivityCount Error %d"), err);
       
   361 		SetError(err);
       
   362 		}
       
   363 	else
       
   364 		{
       
   365 		//InactivityCount
       
   366 		INFO_PRINTF2(_L("PSUBASE: InactivityCount  = %d \n"),inactivityCount);
       
   367 		TInt	expectedinactivityCount;
       
   368 		if(GetIntFromConfig(aSection, KExpectedInactivityCount(), expectedinactivityCount))
       
   369 			{
       
   370 			if(inactivityCount != expectedinactivityCount)
       
   371 				{
       
   372 				SetBlockResult(EFail);
       
   373 				ERR_PRINTF3(_L("inactivityCount(%d) != expectedinactivityCount(%d)"), inactivityCount, expectedinactivityCount);
       
   374 				}
       
   375 			}
       
   376 		else
       
   377 			{
       
   378 			SetBlockResult(EFail);
       
   379 			WARN_PRINTF1(_L("expectedinactivityCount Value Missing From INI File"));
       
   380 			}
       
   381 		}
       
   382 	}
       
   383 
       
   384 /**
       
   385  * Bus not locked counter
       
   386  *
       
   387  * @param aSection			The section in the ini containing data for the command
       
   388  *
       
   389  * @return					void
       
   390  *
       
   391  * @leave					System wide error
       
   392  */
       
   393 void CT_MMCSDPsuBaseDriverData::DoCmdNotLockedCount(const TDesC& aSection)
       
   394 	{
       
   395  	TInt err;
       
   396  	TInt notLockedCount;
       
   397  	err = iMmcSDController->NotLockedCount(notLockedCount);
       
   398 	if ( err!=KErrNone )
       
   399 		{
       
   400 		ERR_PRINTF2(_L("NotLockedCount Error %d"), err);
       
   401 		SetError(err);
       
   402 		}
       
   403 	else
       
   404 		{
       
   405 		//NotLockedCount
       
   406 		INFO_PRINTF2(_L("PSUBASE: NotLockedCount  = %d \n"),notLockedCount);
       
   407 		TInt	expectednotLockedCount;
       
   408 		if(GetIntFromConfig(aSection, KExpectedNotLockedCount(), expectednotLockedCount))
       
   409 			{
       
   410 			if(notLockedCount != expectednotLockedCount)
       
   411 				{
       
   412 				SetBlockResult(EFail);
       
   413 				ERR_PRINTF3(_L("notLockedCount(%d) != expectednotLockedCount(%d)"), notLockedCount, expectednotLockedCount);
       
   414 				}
       
   415 			}
       
   416 		else
       
   417 			{
       
   418 			SetBlockResult(EFail);
       
   419 			WARN_PRINTF1(_L("expectednotLockedCount Value Missing From INI File"));
       
   420 			}
       
   421 		}
       
   422 	}
       
   423 
       
   424 /**
       
   425  * Bus inactivity timeout period, in seconds, when clients are registered
       
   426  *
       
   427  * @param aSection			The section in the ini containing data for the command
       
   428  *
       
   429  * @return					void
       
   430  *
       
   431  * @leave					System wide error
       
   432  */
       
   433 void CT_MMCSDPsuBaseDriverData::DoCmdInactivityTimeout(const TDesC& aSection)
       
   434 	{
       
   435  	TInt err;
       
   436  	TInt inactivityTimeout;
       
   437  	err = iMmcSDController->InactivityTimeout(inactivityTimeout);
       
   438 	if ( err!=KErrNone )
       
   439 		{
       
   440 		ERR_PRINTF2(_L("InactivityTimeout Error %d"), err);
       
   441 		SetError(err);
       
   442 		}
       
   443 	else
       
   444 		{
       
   445 		//InactivityTimeout
       
   446 		INFO_PRINTF2(_L("PSUBASE: InactivityTimeout  = %d \n"),inactivityTimeout);
       
   447 		TInt	expectedinactivityTimeout;
       
   448 		if(GetIntFromConfig(aSection, KExpectedInactivityTimeout(), expectedinactivityTimeout))
       
   449 			{
       
   450 			if(inactivityTimeout != expectedinactivityTimeout)
       
   451 				{
       
   452 				SetBlockResult(EFail);
       
   453 				ERR_PRINTF3(_L("inactivityTimeout(%d) != expectedinactivityTimeout(%d)"), inactivityTimeout, expectedinactivityTimeout);
       
   454 				}
       
   455 			}
       
   456 		else
       
   457 			{
       
   458 			SetBlockResult(EFail);
       
   459 			WARN_PRINTF1(_L("expectedinactivityTimeout Value Missing From INI File"));
       
   460 			}
       
   461 		}
       
   462 	}
       
   463 
       
   464 /**
       
   465  * Bus not locked timeout period, in seconds, when no clients are registered
       
   466  *
       
   467  * @param aSection			The section in the ini containing data for the command
       
   468  *
       
   469  * @return					void
       
   470  *
       
   471  * @leave					System wide error
       
   472  */
       
   473 void CT_MMCSDPsuBaseDriverData::DoCmdNotLockedTimeout(const TDesC& aSection)
       
   474 	{
       
   475  	TInt err;
       
   476  	TInt notLockedTimeout;
       
   477  	err = iMmcSDController->NotLockedTimeout(notLockedTimeout);
       
   478 	if ( err!=KErrNone )
       
   479 		{
       
   480 		ERR_PRINTF2(_L("NotLockedTimeout Error %d"), err);
       
   481 		SetError(err);
       
   482 		}
       
   483 	else
       
   484 		{
       
   485 		//NotLockedTimeout
       
   486 		INFO_PRINTF2(_L("PSUBASE: NotLockedTimeout  = %d \n"),notLockedTimeout);
       
   487 		TInt	expectednotLockedTimeout;
       
   488 		if(GetIntFromConfig(aSection, KExpectedNotLockedTimeout(), expectednotLockedTimeout))
       
   489 			{
       
   490 			if(notLockedTimeout != expectednotLockedTimeout)
       
   491 				{
       
   492 				SetBlockResult(EFail);
       
   493 				ERR_PRINTF3(_L("notLockedTimeout(%d) != expectednotLockedTimeout(%d)"), notLockedTimeout, expectednotLockedTimeout);
       
   494 				}
       
   495 			}
       
   496 		else
       
   497 			{
       
   498 			SetBlockResult(EFail);
       
   499 			WARN_PRINTF1(_L("expectednotLockedTimeout Value Missing From INI File"));
       
   500 			}
       
   501 		}
       
   502 	}
       
   503 
       
   504 /**
       
   505  * Indicates the voltage level, or range of voltages supported
       
   506  *
       
   507  * @param aSection			The section in the ini containing data for the command
       
   508  *
       
   509  * @return					void
       
   510  *
       
   511  * @leave					System wide error
       
   512  */
       
   513 void CT_MMCSDPsuBaseDriverData::DoCmdMemVoltageSupported(const TDesC& aSection)
       
   514 	{
       
   515  	TInt err;
       
   516  	TUint memVoltageSupported;
       
   517  	err = iMmcSDController->MemVoltageSupported(memVoltageSupported);
       
   518 	if ( err!=KErrNone )
       
   519 		{
       
   520 		ERR_PRINTF2(_L("MemVoltageSupported Error %u"), err);
       
   521 		SetError(err);
       
   522 		}
       
   523 	else
       
   524 		{
       
   525 		//MemVoltageSupported
       
   526 		INFO_PRINTF2(_L("PSUBASE: MemVoltageSupported  = %x \n"),memVoltageSupported);
       
   527 		TUint	expectedmemVoltageSupported;
       
   528 		if(GetUintFromConfig(aSection, KExpectedMemVoltageSupported(), expectedmemVoltageSupported))
       
   529 			{
       
   530 			if(memVoltageSupported != expectedmemVoltageSupported)
       
   531 				{
       
   532 				SetBlockResult(EFail);
       
   533 				ERR_PRINTF3(_L("memVoltageSupported(%x) != expectedmemVoltageSupported(%x)"), memVoltageSupported, expectedmemVoltageSupported);
       
   534 				}
       
   535 			}
       
   536 		else
       
   537 			{
       
   538 			SetBlockResult(EFail);
       
   539 			WARN_PRINTF1(_L("expectedmemVoltageSupported Value Missing From INI File"));
       
   540 			}
       
   541 		}
       
   542 	}
       
   543 
       
   544 /**
       
   545  * The maximum current (in microAmps) that the PSU is able to supply
       
   546  *
       
   547  * @param aSection			The section in the ini containing data for the command
       
   548  *
       
   549  * @return					void
       
   550  *
       
   551  * @leave					System wide error
       
   552  */
       
   553 void CT_MMCSDPsuBaseDriverData::DoCmdMemMaxCurrentInMicroAmps(const TDesC& aSection)
       
   554 	{
       
   555  	TInt err;
       
   556  	TInt memMaxCurrentInMicroAmps;
       
   557  	err = iMmcSDController->MemMaxCurrentInMicroAmps(memMaxCurrentInMicroAmps);
       
   558 	if ( err!=KErrNone )
       
   559 		{
       
   560 		ERR_PRINTF2(_L("MemMaxCurrentInMicroAmps Error %d"), err);
       
   561 		SetError(err);
       
   562 		}
       
   563 	else
       
   564 		{
       
   565 		//MemMaxCurrentInMicroAmps
       
   566 		INFO_PRINTF2(_L("PSUBASE: MemMaxCurrentInMicroAmps  = %d \n"),memMaxCurrentInMicroAmps);
       
   567 		TInt	expectedmemMaxCurrentInMicroAmps;
       
   568 		if(GetIntFromConfig(aSection, KExpectedMemMaxCurrentInMicroAmps(), expectedmemMaxCurrentInMicroAmps))
       
   569 			{
       
   570 			if(memMaxCurrentInMicroAmps != expectedmemMaxCurrentInMicroAmps)
       
   571 				{
       
   572 				SetBlockResult(EFail);
       
   573 				ERR_PRINTF3(_L("memMaxCurrentInMicroAmps(%d) != expectedmemMaxCurrentInMicroAmps(%d)"), memMaxCurrentInMicroAmps, expectedmemMaxCurrentInMicroAmps);
       
   574 				}
       
   575 			}
       
   576 		else
       
   577 			{
       
   578 			SetBlockResult(EFail);
       
   579 			WARN_PRINTF1(_L("expectedmemMaxCurrentInMicroAmps Value Missing From INI File"));
       
   580 			}
       
   581 		}
       
   582 	}
       
   583 
       
   584 /**
       
   585  * Indicates whether the platform hardware has support for checking whether the voltage level of the
       
   586  * PSU is within its expected voltage limit while turned on
       
   587  *
       
   588  * @param aSection			The section in the ini containing data for the command
       
   589  *
       
   590  * @return					void
       
   591  *
       
   592  * @leave					System wide error
       
   593  */
       
   594 void CT_MMCSDPsuBaseDriverData::DoCmdVoltCheckInterval(const TDesC& aSection)
       
   595 	{
       
   596  	TInt err;
       
   597  	TUint voltCheckInterval;
       
   598  	err = iMmcSDController->VoltCheckInterval(voltCheckInterval);
       
   599 	if ( err!=KErrNone )
       
   600 		{
       
   601 		ERR_PRINTF2(_L("VoltCheckInterval Error %d"), err);
       
   602 		SetError(err);
       
   603 		}
       
   604 	else
       
   605 		{
       
   606 		//VoltCheckInterval
       
   607 		INFO_PRINTF2(_L("PSUBASE: VoltCheckInterval  = %u \n"),voltCheckInterval);
       
   608 		TUint	expectedvoltCheckInterval;
       
   609 		if(GetUintFromConfig(aSection, KExpectedVoltageinterval(), expectedvoltCheckInterval))
       
   610 			{
       
   611 			if(voltCheckInterval != expectedvoltCheckInterval)
       
   612 				{
       
   613 				SetBlockResult(EFail);
       
   614 				ERR_PRINTF3(_L("voltCheckInterval(%u) != expectedvoltCheckInterval(%u)"), voltCheckInterval, expectedvoltCheckInterval);
       
   615 				}
       
   616 			}
       
   617 		else
       
   618 			{
       
   619 			SetBlockResult(EFail);
       
   620 			WARN_PRINTF1(_L("expectedvoltCheckInterval Value Missing From INI File"));
       
   621 			}
       
   622 		}
       
   623 	}