|
1 // Copyright (c) 2001-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 "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 // contains utilities such as a global comms init function for starting c32 and loading device drives for test code |
|
15 // |
|
16 // |
|
17 |
|
18 #include "t_utils.h" |
|
19 |
|
20 #if !defined __E32BASE_H__ |
|
21 #include <e32base.h> |
|
22 #endif |
|
23 |
|
24 // for StartC32() |
|
25 #if !defined __C32COMM_H__ |
|
26 #include <c32comm.h> |
|
27 #endif |
|
28 |
|
29 |
|
30 #if defined (__WINS__) |
|
31 #define PDD_NAME _L("ECDRV") |
|
32 #else |
|
33 #define PDD_NAME _L("EUART1") |
|
34 #define PDD2_NAME _L("EUART2") |
|
35 #define PDD3_NAME _L("EUART3") |
|
36 #define PDD4_NAME _L("EUART4") |
|
37 #endif |
|
38 |
|
39 #define LDD_NAME _L("ECOMM") |
|
40 |
|
41 void RHttpTestUtils::InitCommsL() |
|
42 { |
|
43 TInt ret = User::LoadPhysicalDevice(PDD_NAME); |
|
44 User::LeaveIfError(ret); |
|
45 |
|
46 #ifndef __WINS__ |
|
47 User::LoadPhysicalDevice(PDD2_NAME); |
|
48 User::LoadPhysicalDevice(PDD3_NAME); |
|
49 User::LoadPhysicalDevice(PDD4_NAME); |
|
50 #endif |
|
51 |
|
52 ret = User::LoadLogicalDevice(LDD_NAME); |
|
53 User::LeaveIfError(ret); |
|
54 |
|
55 ret = StartC32(); |
|
56 User::LeaveIfError(ret); |
|
57 } |
|
58 |