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