os/ossrv/genericopenlibs/cstdlib/LINCSYS/IOCTL.H
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericopenlibs/cstdlib/LINCSYS/IOCTL.H	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,85 @@
     1.4 +/*
     1.5 +* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +
    1.23 +/**
    1.24 + @file
    1.25 + @publishedAll
    1.26 + @released
    1.27 +*/
    1.28 +
    1.29 +#ifndef _SYS_IOCTL_H_
    1.30 +#define _SYS_IOCTL_H_
    1.31 +
    1.32 +#include <_ansi.h>
    1.33 +#include <sys/serial.h>
    1.34 +
    1.35 +#ifdef __cplusplus
    1.36 +extern "C" {
    1.37 +#endif
    1.38 +
    1.39 +/**
    1.40 +ioctls under EPOC32 are only loosely related to ioctls in other systems
    1.41 +The _IOR(), _IOW() and _IOWR() macros are provided for documentation purposes,
    1.42 +to indicate the appropriate form of the third parameter
    1.43 +*/
    1.44 +#define _IOW(n,T)	(n)	/* passes in a T value via the supplied T* ptr */
    1.45 +#define _IOR(n,T)	(n)	/* returns a T value via the supplied T* ptr */ 
    1.46 +#define _IOWR(n,T)	(n)	/* both of the above */
    1.47 +
    1.48 +IMPORT_C int ioctl (int, int, void*);
    1.49 +
    1.50 +/**
    1.51 +number of bytes available to be read - cf BSD FIONREAD 
    1.52 +*/
    1.53 +#define E32IONREAD	_IOR( 1,int)	
    1.54 +
    1.55 +/**
    1.56 +ioctl-based form of select with infinite timeout - specify a mask of selectable
    1.57 +states and receive back the mask of triggering states
    1.58 +*/
    1.59 +#define E32IOSELECT	_IOWR(2,int)	
    1.60 +#   define E32SELECT_READ	0x01
    1.61 +#   define E32SELECT_WRITE	0x02
    1.62 +#   define E32SELECT_EXCEPT	0x04
    1.63 +
    1.64 +
    1.65 +/**
    1.66 +ioctls for serial port			values may change
    1.67 +*/
    1.68 +#define COMMIOCTL_SETSIGNALS		1
    1.69 +#define	COMMIOCTL_GETSIGNALS		2
    1.70 +#define COMMIOCTL_SETCONFIG			3
    1.71 +#define	COMMIOCTL_GETCONFIG			4
    1.72 +#define	COMMIOCTL_BREAK				5
    1.73 +#define	COMMIOCTL_SETREADTIMEOUT	6
    1.74 +#define	COMMIOCTL_GETREADTIMEOUT	7
    1.75 +#define	COMMIOCTL_SETREADTHRESHOLD	8
    1.76 +#define	COMMIOCTL_GETREADTHRESHOLD	9
    1.77 +#define	COMMIOCTL_SETBUFFERLENGTH	10
    1.78 +#define	COMMIOCTL_GETBUFFERLENGTH	11
    1.79 +#define	COMMIOCTL_NOTIFYSUPPORTED	12
    1.80 +#define	COMMIOCTL_NOTIFY			0x400d
    1.81 +
    1.82 +#define	REAL_COMMIOCTL_NOTIFY		13		// = COMMIOCTL_NOTIFY-0x4000
    1.83 +
    1.84 +
    1.85 +#ifdef __cplusplus
    1.86 +}
    1.87 +#endif
    1.88 +#endif