sl@0: /* sl@0: * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: sl@0: #ifndef _SYS_IOCTL_H_ sl@0: #define _SYS_IOCTL_H_ sl@0: sl@0: #include <_ansi.h> sl@0: #include sl@0: sl@0: #ifdef __cplusplus sl@0: extern "C" { sl@0: #endif sl@0: sl@0: /** sl@0: ioctls under EPOC32 are only loosely related to ioctls in other systems sl@0: The _IOR(), _IOW() and _IOWR() macros are provided for documentation purposes, sl@0: to indicate the appropriate form of the third parameter sl@0: */ sl@0: #define _IOW(n,T) (n) /* passes in a T value via the supplied T* ptr */ sl@0: #define _IOR(n,T) (n) /* returns a T value via the supplied T* ptr */ sl@0: #define _IOWR(n,T) (n) /* both of the above */ sl@0: sl@0: IMPORT_C int ioctl (int, int, void*); sl@0: sl@0: /** sl@0: number of bytes available to be read - cf BSD FIONREAD sl@0: */ sl@0: #define E32IONREAD _IOR( 1,int) sl@0: sl@0: /** sl@0: ioctl-based form of select with infinite timeout - specify a mask of selectable sl@0: states and receive back the mask of triggering states sl@0: */ sl@0: #define E32IOSELECT _IOWR(2,int) sl@0: # define E32SELECT_READ 0x01 sl@0: # define E32SELECT_WRITE 0x02 sl@0: # define E32SELECT_EXCEPT 0x04 sl@0: sl@0: sl@0: /** sl@0: ioctls for serial port values may change sl@0: */ sl@0: #define COMMIOCTL_SETSIGNALS 1 sl@0: #define COMMIOCTL_GETSIGNALS 2 sl@0: #define COMMIOCTL_SETCONFIG 3 sl@0: #define COMMIOCTL_GETCONFIG 4 sl@0: #define COMMIOCTL_BREAK 5 sl@0: #define COMMIOCTL_SETREADTIMEOUT 6 sl@0: #define COMMIOCTL_GETREADTIMEOUT 7 sl@0: #define COMMIOCTL_SETREADTHRESHOLD 8 sl@0: #define COMMIOCTL_GETREADTHRESHOLD 9 sl@0: #define COMMIOCTL_SETBUFFERLENGTH 10 sl@0: #define COMMIOCTL_GETBUFFERLENGTH 11 sl@0: #define COMMIOCTL_NOTIFYSUPPORTED 12 sl@0: #define COMMIOCTL_NOTIFY 0x400d sl@0: sl@0: #define REAL_COMMIOCTL_NOTIFY 13 // = COMMIOCTL_NOTIFY-0x4000 sl@0: sl@0: sl@0: #ifdef __cplusplus sl@0: } sl@0: #endif sl@0: #endif