equal
deleted
inserted
replaced
1 // Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of the License "Eclipse Public License v1.0" |
4 // under the terms of the License "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
16 // Device-side part, to work against USBRFLCT running on the host. |
16 // Device-side part, to work against USBRFLCT running on the host. |
17 // |
17 // |
18 // |
18 // |
19 |
19 |
20 #include "t_usb.h" |
20 #include "t_usb.h" |
21 #include "OstTraceDefinitions.h" |
|
22 #ifdef OST_TRACE_COMPILER_IN_USE |
|
23 #include "t_usbTraces.h" |
|
24 #endif |
|
25 |
21 |
26 |
22 |
27 void RunAppL(TBool aVerboseOutput) |
23 void RunAppL(TBool aVerboseOutput) |
28 { |
24 { |
29 OstTrace0(TRACE_NORMAL, RUNAPPL_RUNAPPL, "RunAppL()"); |
25 RDebug::Print(_L("RunAppL()")); |
30 // Construct the active scheduler |
26 // Construct the active scheduler |
31 CActiveScheduler* myScheduler = new (ELeave) CActiveScheduler(); |
27 CActiveScheduler* myScheduler = new (ELeave) CActiveScheduler(); |
32 |
28 |
33 // Push active scheduler onto the cleanup stack |
29 // Push active scheduler onto the cleanup stack |
34 CleanupStack::PushL(myScheduler); |
30 CleanupStack::PushL(myScheduler); |
58 } |
54 } |
59 |
55 |
60 |
56 |
61 TInt E32Main() |
57 TInt E32Main() |
62 { |
58 { |
63 OstTrace0(TRACE_NORMAL, E32MAIN_E32MAIN, "E32Main()"); |
59 RDebug::Print(_L("E32Main()")); |
64 |
60 |
65 CTrapCleanup* cleanup = CTrapCleanup::New(); // get clean-up stack |
61 CTrapCleanup* cleanup = CTrapCleanup::New(); // get clean-up stack |
66 |
62 |
67 __UHEAP_MARK; |
63 __UHEAP_MARK; |
68 |
64 |
70 TBuf<64> c; |
66 TBuf<64> c; |
71 User::CommandLine(c); |
67 User::CommandLine(c); |
72 TBool verbose = EFalse; |
68 TBool verbose = EFalse; |
73 if (c.CompareF(KArg) == 0) |
69 if (c.CompareF(KArg) == 0) |
74 { |
70 { |
75 OstTrace0(TRACE_NORMAL, E32MAIN_E32MAIN_DUP01, "(Verbose output enabled.)\n"); |
71 RDebug::Print(_L("(Verbose output enabled.)\n")); |
76 verbose = ETrue; |
72 verbose = ETrue; |
77 } |
73 } |
78 |
74 |
79 TRAPD(error, RunAppL(verbose)); |
75 TRAPD(error, RunAppL(verbose)); |
80 |
76 |
82 |
78 |
83 __UHEAP_MARKEND; |
79 __UHEAP_MARKEND; |
84 |
80 |
85 delete cleanup; // destroy clean-up stack |
81 delete cleanup; // destroy clean-up stack |
86 |
82 |
87 OstTrace0(TRACE_NORMAL, E32MAIN_E32MAIN_DUP02, "Program exit: done.\n"); |
83 RDebug::Print(_L("Program exit: done.\n")); |
88 |
84 |
89 return 0; // and return |
85 return 0; // and return |
90 } |
86 } |
91 |
87 |
92 |
88 |