equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * CSerialPort |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __CSERIALPORT_H__ |
|
22 #define __CSERIALPORT_H__ |
|
23 |
|
24 |
|
25 /************************************************************************************* |
|
26 * |
|
27 * Includes |
|
28 * |
|
29 ************************************************************************************/ |
|
30 #include <windows.h> |
|
31 |
|
32 |
|
33 /************************************************************************************* |
|
34 * |
|
35 * CSerialPort Definition |
|
36 * |
|
37 ************************************************************************************/ |
|
38 class CSerialPort |
|
39 { |
|
40 public: |
|
41 CSerialPort(); |
|
42 ~CSerialPort(); |
|
43 |
|
44 int OpenPort( char *aComPort ); |
|
45 void ClosePort(); |
|
46 int ReceiveBytes( char *aBuff, int *aLength ); |
|
47 int SendBytes( char *aBuff, int *aLength ); |
|
48 HANDLE Handle() { return iComPort; } |
|
49 |
|
50 private: |
|
51 HANDLE iComPort; |
|
52 HANDLE iMutex; |
|
53 }; |
|
54 |
|
55 #endif //__MUCCSCONTROL_H__ |