equal
deleted
inserted
replaced
|
1 // Copyright (c) 1997-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 // |
|
15 |
|
16 //#include "testenv.h" |
|
17 #include <e32hal.h> |
|
18 #include <c32comm.h> |
|
19 |
|
20 #if defined (__WINS__) |
|
21 #define PDD_NAME _L("ECDRV") |
|
22 #define LDD_NAME _L("ECOMM") |
|
23 #define LDD_FNAME _L("ECOMM") |
|
24 #else |
|
25 #define PDD_NAME _L("EUART1") |
|
26 #define PDD2_NAME _L("EUART2") |
|
27 #define LDD_NAME _L("ECOMM") |
|
28 #define LDD_FNAME _L("FCOMM") |
|
29 #endif |
|
30 |
|
31 GLDEF_C void CommInitL() |
|
32 { |
|
33 TInt err; |
|
34 err=StartC32(); |
|
35 if (err!=KErrNone && err!=KErrAlreadyExists) |
|
36 { |
|
37 User::Leave(err); |
|
38 } |
|
39 err=User::LoadPhysicalDevice(PDD_NAME); |
|
40 if (err!=KErrNone && err!=KErrAlreadyExists) |
|
41 User::Leave(err); |
|
42 err=User::LoadLogicalDevice(LDD_NAME); |
|
43 if (err!=KErrNone && err!=KErrAlreadyExists) |
|
44 User::Leave(err); |
|
45 } |
|
46 |