2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
30 #include <sys/serial.h>
37 ioctls under EPOC32 are only loosely related to ioctls in other systems
38 The _IOR(), _IOW() and _IOWR() macros are provided for documentation purposes,
39 to indicate the appropriate form of the third parameter
41 #define _IOW(n,T) (n) /* passes in a T value via the supplied T* ptr */
42 #define _IOR(n,T) (n) /* returns a T value via the supplied T* ptr */
43 #define _IOWR(n,T) (n) /* both of the above */
45 IMPORT_C int ioctl (int, int, void*);
48 number of bytes available to be read - cf BSD FIONREAD
50 #define E32IONREAD _IOR( 1,int)
53 ioctl-based form of select with infinite timeout - specify a mask of selectable
54 states and receive back the mask of triggering states
56 #define E32IOSELECT _IOWR(2,int)
57 # define E32SELECT_READ 0x01
58 # define E32SELECT_WRITE 0x02
59 # define E32SELECT_EXCEPT 0x04
63 ioctls for serial port values may change
65 #define COMMIOCTL_SETSIGNALS 1
66 #define COMMIOCTL_GETSIGNALS 2
67 #define COMMIOCTL_SETCONFIG 3
68 #define COMMIOCTL_GETCONFIG 4
69 #define COMMIOCTL_BREAK 5
70 #define COMMIOCTL_SETREADTIMEOUT 6
71 #define COMMIOCTL_GETREADTIMEOUT 7
72 #define COMMIOCTL_SETREADTHRESHOLD 8
73 #define COMMIOCTL_GETREADTHRESHOLD 9
74 #define COMMIOCTL_SETBUFFERLENGTH 10
75 #define COMMIOCTL_GETBUFFERLENGTH 11
76 #define COMMIOCTL_NOTIFYSUPPORTED 12
77 #define COMMIOCTL_NOTIFY 0x400d
79 #define REAL_COMMIOCTL_NOTIFY 13 // = COMMIOCTL_NOTIFY-0x4000