1 ioctl.h |
1 /* |
|
2 * Copyright (c) 1997-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 /** |
|
24 @file |
|
25 @publishedAll |
|
26 @released |
|
27 */ |
|
28 |
|
29 #ifndef _SYS_IOCTL_H_ |
|
30 #define _SYS_IOCTL_H_ |
|
31 |
|
32 #include <_ansi.h> |
|
33 #include <sys/serial.h> |
|
34 |
|
35 #ifdef __cplusplus |
|
36 extern "C" { |
|
37 #endif |
|
38 |
|
39 /** |
|
40 ioctls under EPOC32 are only loosely related to ioctls in other systems |
|
41 The _IOR(), _IOW() and _IOWR() macros are provided for documentation purposes, |
|
42 to indicate the appropriate form of the third parameter |
|
43 */ |
|
44 #define _IOW(n,T) (n) /* passes in a T value via the supplied T* ptr */ |
|
45 #define _IOR(n,T) (n) /* returns a T value via the supplied T* ptr */ |
|
46 #define _IOWR(n,T) (n) /* both of the above */ |
|
47 |
|
48 IMPORT_C int ioctl (int, int, void*); |
|
49 |
|
50 /** |
|
51 number of bytes available to be read - cf BSD FIONREAD |
|
52 */ |
|
53 #define E32IONREAD _IOR( 1,int) |
|
54 |
|
55 /** |
|
56 ioctl-based form of select with infinite timeout - specify a mask of selectable |
|
57 states and receive back the mask of triggering states |
|
58 */ |
|
59 #define E32IOSELECT _IOWR(2,int) |
|
60 # define E32SELECT_READ 0x01 |
|
61 # define E32SELECT_WRITE 0x02 |
|
62 # define E32SELECT_EXCEPT 0x04 |
|
63 |
|
64 |
|
65 /** |
|
66 ioctls for serial port values may change |
|
67 */ |
|
68 #define COMMIOCTL_SETSIGNALS 1 |
|
69 #define COMMIOCTL_GETSIGNALS 2 |
|
70 #define COMMIOCTL_SETCONFIG 3 |
|
71 #define COMMIOCTL_GETCONFIG 4 |
|
72 #define COMMIOCTL_BREAK 5 |
|
73 #define COMMIOCTL_SETREADTIMEOUT 6 |
|
74 #define COMMIOCTL_GETREADTIMEOUT 7 |
|
75 #define COMMIOCTL_SETREADTHRESHOLD 8 |
|
76 #define COMMIOCTL_GETREADTHRESHOLD 9 |
|
77 #define COMMIOCTL_SETBUFFERLENGTH 10 |
|
78 #define COMMIOCTL_GETBUFFERLENGTH 11 |
|
79 #define COMMIOCTL_NOTIFYSUPPORTED 12 |
|
80 #define COMMIOCTL_NOTIFY 0x400d |
|
81 |
|
82 #define REAL_COMMIOCTL_NOTIFY 13 // = COMMIOCTL_NOTIFY-0x4000 |
|
83 |
|
84 |
|
85 #ifdef __cplusplus |
|
86 } |
|
87 #endif |
|
88 #endif |