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