OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uC-libc/] [include/] [linux/] [capi.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
/*
2
 * $Id: capi.h,v 1.1.1.1 2001-09-10 07:43:48 simons Exp $
3
 *
4
 * CAPI 2.0 Interface for Linux
5
 *
6
 * Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
7
 *
8
 * $Log: not supported by cvs2svn $
9
 * Revision 1.1.1.1  2001/07/02 17:58:00  simons
10
 * Initial revision
11
 *
12
 * Revision 1.1  1997/03/04 21:27:33  calle
13
 * First version in isdn4linux
14
 *
15
 * Revision 2.2  1997/02/12 09:31:39  calle
16
 * new version
17
 *
18
 * Revision 1.1  1997/01/31 10:32:20  calle
19
 * Initial revision
20
 *
21
 *
22
 */
23
 
24
#ifndef __LINUX_CAPI_H__
25
#define __LINUX_CAPI_H__
26
 
27
#include <asm/types.h>
28
#include <linux/ioctl.h>
29
#ifndef __KERNEL__
30
#include <linux/kernelcapi.h>
31
#endif
32
 
33
/*
34
 * CAPI_REGISTER
35
 */
36
 
37
typedef struct capi_register_params {   /* CAPI_REGISTER */
38
        __u32 level3cnt;        /* No. of simulatneous user data connections */
39
        __u32 datablkcnt;       /* No. of buffered data messages */
40
        __u32 datablklen;       /* Size of buffered data messages */
41
} capi_register_params;
42
 
43
#define CAPI_REGISTER   _IOW('C',0x01,struct capi_register_params)
44
 
45
/*
46
 * CAPI_GET_MANUFACTURER
47
 */
48
 
49
#define CAPI_MANUFACTURER_LEN           64
50
 
51
#define CAPI_GET_MANUFACTURER   _IOWR('C',0x06,CAPI_MANUFACTURER_LEN)
52
 
53
/*
54
 * CAPI_GET_VERSION
55
 */
56
 
57
typedef struct capi_version {
58
        __u32 majorversion;
59
        __u32 minorversion;
60
        __u32 majormanuversion;
61
        __u32 minormanuversion;
62
} capi_version;
63
 
64
#define CAPI_GET_VERSION        _IOWR('C',0x07,struct capi_version)
65
 
66
/*
67
 * CAPI_GET_SERIAL
68
 */
69
 
70
#define CAPI_SERIAL_LEN         8
71
#define CAPI_GET_SERIAL         _IOWR('C',0x08, CAPI_SERIAL_LEN)
72
 
73
/*
74
 * CAPI_GET_PROFILE
75
 */
76
 
77
typedef struct capi_profile {
78
        __u16 ncontroller;      /* number of installed controller */
79
        __u16 nbchannel;        /* number of B-Channels */
80
        __u32 goptions;         /* global options */
81
        __u32 support1;         /* B1 protocols support */
82
        __u32 support2;         /* B2 protocols support */
83
        __u32 support3;         /* B3 protocols support */
84
        __u32 reserved[6];      /* reserved */
85
        __u32 manu[5];          /* manufacturer specific information */
86
} capi_profile;
87
 
88
#define CAPI_GET_PROFILE        _IOWR('C',0x09,struct capi_profile)
89
 
90
typedef struct capi_manufacturer_cmd {
91
        unsigned long cmd;
92
        void *data;
93
} capi_manufacturer_cmd;
94
 
95
/*
96
 * CAPI_MANUFACTURER_CMD
97
 */
98
 
99
#define CAPI_MANUFACTURER_CMD   _IOWR('C',0x20, struct capi_manufacturer_cmd)
100
 
101
/*
102
 * CAPI_GET_ERRCODE
103
 * capi errcode is set, * if read, write, or ioctl returns EIO,
104
 * ioctl returns errcode directly, and in arg, if != 0
105
 */
106
 
107
#define CAPI_GET_ERRCODE        _IOR('C',0x21, __u16)
108
 
109
/*
110
 * CAPI_INSTALLED
111
 */
112
#define CAPI_INSTALLED          _IOR('C',0x22, __u16)
113
 
114
/*
115
 * member contr is input for
116
 * CAPI_GET_MANUFACTURER, CAPI_VERSION, CAPI_GET_SERIAL
117
 * and CAPI_GET_PROFILE
118
 */
119
typedef union capi_ioctl_struct {
120
        __u32 contr;
121
        capi_register_params rparams;
122
        __u8 manufacturer[CAPI_MANUFACTURER_LEN];
123
        capi_version version;
124
        __u8 serial[CAPI_SERIAL_LEN];
125
        capi_profile profile;
126
        capi_manufacturer_cmd cmd;
127
        __u16 errcode;
128
} capi_ioctl_struct;
129
 
130
#endif                          /* __LINUX_CAPI_H__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.