kerneltest/e32test/usbho/t_otgdi/inc/testcase0675.h
changeset 9 96e5fb8b040d
equal deleted inserted replaced
-1:000000000000 9:96e5fb8b040d
       
     1 // Copyright (c) 2007-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 // @internalComponent
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef TESTCASE0675_H
       
    19 #define TESTCASE0675_H
       
    20 
       
    21 
       
    22 	
       
    23 //----------------------------------------------------------------------------------------------		
       
    24 //! @SYMTestCaseID				PBASE-T_OTGDI-0675
       
    25 //! @SYMTestCaseDesc			A-Device requests bus, VBUS is high (PBASE-USB_OTGDI-0675)
       
    26 //! @SYMFssID 
       
    27 //! @SYMPREQ					1305
       
    28 //! @SYMREQ						8927
       
    29 //! @SYMTestType				UT
       
    30 //! @SYMTestPriority			1 
       
    31 //! @SYMTestActions 			1.	Call function on OTGDI to trigger raise VBUS - BusRequest()
       
    32 //!                             2.	Retrieve error event from error callback
       
    33 //! @SYMTestExpectedResults 	Error KErrUsbOtgVbusAlreadyRaised should be observed
       
    34 //! @SYMTestStatus              Implemented	
       
    35 //----------------------------------------------------------------------------------------------	
       
    36 
       
    37 	class CTestCase0675 : public CTestCaseRoot
       
    38 	{
       
    39 public:
       
    40 	static CTestCase0675* NewL(TBool aHost);
       
    41 	virtual ~CTestCase0675(); 	
       
    42 	
       
    43 	virtual void ExecuteTestCaseL();
       
    44 	void DoCancel();
       
    45 	static void CancelKB(CTestCaseRoot *pThis);
       
    46 protected:	
       
    47 	void RunStepL();
       
    48 	virtual void DescribePreconditions();
       
    49 	TInt GetStepIndex()	{ return(iCaseStep); };
       
    50 
       
    51 	static void CancelNotify(CTestCaseRoot *pThis);	
       
    52 	
       
    53 private:
       
    54 	CTestCase0675(TBool aHost);
       
    55 	void ConstructL();
       
    56 
       
    57 	// DATA
       
    58 private:		
       
    59 	TInt iRepeats;		// loop counter, 
       
    60 
       
    61 
       
    62 	enum TCaseSteps
       
    63 		{
       
    64 		EPreconditions,
       
    65 		ELoadLdd,			// load 
       
    66 		EDetectAPlug,		// double-check before starting
       
    67 		ELoopControl,		// loop: START = 3x3 times (wait 50ms)
       
    68 		ELoopDriveVBus1,	// loop: drive1
       
    69 		ELoopVerifyVBus1,	// loop: check1
       
    70 		ELoopDriveVBus2,	// loop: drive2 (error event fires ok)
       
    71 		ELoopVerifyVBus2,	// loop: check2
       
    72 		ELoopWait,      	// loop: wait (50ms)
       
    73 		ELoopDropVBus,  	// loop: drop (prepare for next itteration)
       
    74 		ELoopVerifyDrop,    // loop: check (prepare for next itteration)
       
    75 		EUnloadLdd,		// unload 
       
    76 		ELastStep
       
    77 		};
       
    78 	
       
    79 		
       
    80 	TCaseSteps iCaseStep;
       
    81 	
       
    82 	const static TTestCaseFactoryReceipt<CTestCase0675> iFactoryReceipt;
       
    83 	
       
    84 	CTestCaseWatchdog *iWDTimer;	
       
    85 
       
    86 	void ContinueAfter(TTimeIntervalMicroSeconds32 aMicroSecs, TCaseSteps step);
       
    87 	};
       
    88 
       
    89 	
       
    90 #endif // TESTCASE0675_H