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 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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
33 #include <sys/serial.h>
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
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 */
48 IMPORT_C int ioctl (int, int, void*);
51 number of bytes available to be read - cf BSD FIONREAD
53 #define E32IONREAD _IOR( 1,int)
56 ioctl-based form of select with infinite timeout - specify a mask of selectable
57 states and receive back the mask of triggering states
59 #define E32IOSELECT _IOWR(2,int)
60 # define E32SELECT_READ 0x01
61 # define E32SELECT_WRITE 0x02
62 # define E32SELECT_EXCEPT 0x04
66 ioctls for serial port values may change
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
82 #define REAL_COMMIOCTL_NOTIFY 13 // = COMMIOCTL_NOTIFY-0x4000