1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/usbho/t_otgdi/inc/testcase0676.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,89 @@
1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// @internalComponent
1.18 +//
1.19 +//
1.20 +
1.21 +#ifndef TESTCASE0676_H
1.22 +#define TESTCASE0676_H
1.23 +
1.24 +
1.25 +
1.26 +//----------------------------------------------------------------------------------------------
1.27 +//! @SYMTestCaseID PBASE-T_OTGDI-0476
1.28 +//! @SYMTestCaseDesc A-Device requests bus, VBUS down (PBASE-USB_OTGDI-0676)
1.29 +//! @SYMFssID
1.30 +//! @SYMPREQ 1305
1.31 +//! @SYMREQ 8927
1.32 +//! @SYMTestType UT
1.33 +//! @SYMTestPriority 1
1.34 +//! @SYMTestActions 1. Call function on OTGDI to trigger raise VBUS - BusRequest()
1.35 +//! 2. Retrieve error event from error callback
1.36 +//! @SYMTestExpectedResults Error KErrUsbOtgVbusAlreadyRaised should be observed
1.37 +//! @SYMTestStatus Implemented
1.38 +//----------------------------------------------------------------------------------------------
1.39 +
1.40 + class CTestCase0676 : public CTestCaseRoot
1.41 + {
1.42 +public:
1.43 + static CTestCase0676* NewL(TBool aHost);
1.44 + virtual ~CTestCase0676();
1.45 +
1.46 +protected:
1.47 + virtual void ExecuteTestCaseL();
1.48 + void DoCancel();
1.49 + static void CancelKB(CTestCaseRoot *pThis);
1.50 +
1.51 + void RunStepL();
1.52 + virtual void DescribePreconditions();
1.53 + TInt GetStepIndex() { return(iCaseStep); };
1.54 +
1.55 + static void CancelNotify(CTestCaseRoot *pThis);
1.56 +
1.57 +private:
1.58 + CTestCase0676(TBool aHost);
1.59 + void ConstructL();
1.60 +
1.61 + // DATA
1.62 +private:
1.63 + TInt iRepeats; // loop counter,
1.64 +
1.65 +
1.66 + enum TCaseSteps
1.67 + {
1.68 + EPreconditions,
1.69 + ELoadLdd, // load
1.70 + EDetectAPlug, // double-check before starting
1.71 + ELoopControl, // loop: loop control =3x3 times (wait 50ms)
1.72 + ELoopDriveVBus, // loop: drive
1.73 + ELoopVerifyVBus,// loop: check
1.74 + ELoopWait, // loop: wait (50ms)
1.75 + ELoopDropVBus, // loop: drop
1.76 + ELoopVerifyDrop,// loop: test Vbus dropped, and repeat ELoopDriveVBus
1.77 + EUnloadLdd, // unload
1.78 + ELastStep
1.79 + };
1.80 +
1.81 +
1.82 + TCaseSteps iCaseStep;
1.83 +
1.84 + const static TTestCaseFactoryReceipt<CTestCase0676> iFactoryReceipt;
1.85 +
1.86 + CTestCaseWatchdog *iWDTimer;
1.87 +
1.88 + void ContinueAfter(TTimeIntervalMicroSeconds32 aMicroSecs, TCaseSteps step);
1.89 + };
1.90 +
1.91 +
1.92 +#endif // TESTCASE0676_H