epoc32/include/libc/sys/ioctl.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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 "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 *
    16 */
    17 
    18 
    19 
    20 /**
    21  @file
    22  @publishedAll
    23  @released
    24 */
    25 
    26 #ifndef _SYS_IOCTL_H_
    27 #define _SYS_IOCTL_H_
    28 
    29 #include <_ansi.h>
    30 #include <sys/serial.h>
    31 
    32 #ifdef __cplusplus
    33 extern "C" {
    34 #endif
    35 
    36 /**
    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
    40 */
    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 */
    44 
    45 IMPORT_C int ioctl (int, int, void*);
    46 
    47 /**
    48 number of bytes available to be read - cf BSD FIONREAD 
    49 */
    50 #define E32IONREAD	_IOR( 1,int)	
    51 
    52 /**
    53 ioctl-based form of select with infinite timeout - specify a mask of selectable
    54 states and receive back the mask of triggering states
    55 */
    56 #define E32IOSELECT	_IOWR(2,int)	
    57 #   define E32SELECT_READ	0x01
    58 #   define E32SELECT_WRITE	0x02
    59 #   define E32SELECT_EXCEPT	0x04
    60 
    61 
    62 /**
    63 ioctls for serial port			values may change
    64 */
    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
    78 
    79 #define	REAL_COMMIOCTL_NOTIFY		13		// = COMMIOCTL_NOTIFY-0x4000
    80 
    81 
    82 #ifdef __cplusplus
    83 }
    84 #endif
    85 #endif