~ubuntu-branches/ubuntu/saucy/dahdi-tools/saucy-proposed

« back to all changes in this revision

Viewing changes to xpp/oct612x/include/oct6100api/oct6100_apiud.h

  • Committer: Package Import Robot
  • Author(s): Jackson Doak
  • Date: 2013-08-25 12:48:37 UTC
  • mfrom: (2.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20130825124837-wtefi7f9dsihg8is
Tags: 1:2.7.0-1ubuntu1
* Merge from debian. Remaining changes:
  - debian/control: Added gawk as dependency for dkms build
  - debian/control: Package dahdi Depends on dahdi-dkms | dahdi-source
  - debian/control: Set ubuntu maintainer    
  - added debian/dahdi.postinst
  - debian/control: Removed Uploaders field.
  - added debian/dahdi.postinst
  - added --error-handler=init_failed to debian/rules
  

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
 
2
 
 
3
File:  oct6100_apiud.h
 
4
 
 
5
    Copyright (c) 2001-2007 Octasic Inc.
 
6
    
 
7
Description: 
 
8
 
 
9
        Header file containing the definitions and prototypes that are to be
 
10
        completed by the user.
 
11
 
 
12
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API  is 
 
13
free software; you can redistribute it and/or modify it under the terms of 
 
14
the GNU General Public License as published by the Free Software Foundation; 
 
15
either version 2 of the License, or (at your option) any later version.
 
16
 
 
17
The OCT6100 GPL API is distributed in the hope that it will be useful, but 
 
18
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 
19
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
 
20
for more details. 
 
21
 
 
22
You should have received a copy of the GNU General Public License 
 
23
along with the OCT6100 GPL API; if not, write to the Free Software 
 
24
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 
25
 
 
26
$Octasic_Release: OCT612xAPI-01.00-PR49 $
 
27
 
 
28
$Octasic_Revision: 16 $
 
29
 
 
30
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
 
31
 
 
32
#ifndef __OCT6100_APIUD_H__
 
33
#define __OCT6100_APIUD_H__
 
34
 
 
35
/*****************************  INCLUDE FILES  *******************************/
 
36
 
 
37
#include "octdef.h"
 
38
 
 
39
/*****************************  DEFINES  *************************************/
 
40
 
 
41
 
 
42
/* Determines the maximum length of a burst of reads/writes. This value must
 
43
        be in the range 8 - 1024. This value obtains best performance if set to
 
44
        a power of 2 (i.e. 2^n). */
 
45
#define cOCT6100_MAX_RW_ACCESSES        32
 
46
 
 
47
/* The define used to specify that the Oct6100SeizeSerializeObject function
 
48
        is not to return until the specified serialization object has been seized. */
 
49
#define cOCT6100_WAIT_INFINITELY        0xFFFFFFFF
 
50
 
 
51
 
 
52
/* Compile option: enabling this compile option inserts code to check every
 
53
        call to a user provided function to make sure the function parameters
 
54
        are not changed, as required by the API specification. */
 
55
#define cOCT6100_USER_FUNCTION_CHECK
 
56
 
 
57
 
 
58
 
 
59
#define cOCT6100_GET_TIME_FAILED_0                      0xFFFF0000
 
60
#define cOCT6100_GET_TIME_FAILED_1                      0xFFFF0001
 
61
#define cOCT6100_GET_TIME_FAILED_2                      0xFFFF0002
 
62
#define cOCT6100_GET_TIME_FAILED_3                      0xFFFF0003
 
63
#define cOCT6100_GET_TIME_FAILED_4                      0xFFFF0004
 
64
 
 
65
#define cOCT6100_CREATE_SERIAL_FAILED_0         0xFFFF0010
 
66
#define cOCT6100_CREATE_SERIAL_FAILED_1         0xFFFF0011
 
67
#define cOCT6100_CREATE_SERIAL_FAILED_2         0xFFFF0012
 
68
#define cOCT6100_CREATE_SERIAL_FAILED_3         0xFFFF0013
 
69
#define cOCT6100_CREATE_SERIAL_FAILED_4         0xFFFF0014
 
70
 
 
71
#define cOCT6100_DESTROY_SERIAL_FAILED_0        0xFFFF0020
 
72
#define cOCT6100_DESTROY_SERIAL_FAILED_1        0xFFFF0021
 
73
#define cOCT6100_DESTROY_SERIAL_FAILED_2        0xFFFF0022
 
74
#define cOCT6100_DESTROY_SERIAL_FAILED_3        0xFFFF0023
 
75
#define cOCT6100_DESTROY_SERIAL_FAILED_4        0xFFFF0024
 
76
 
 
77
#define cOCT6100_INVALID_SERIAL_HANDLE_0        0xFFFF0030
 
78
#define cOCT6100_INVALID_SERIAL_HANDLE_1        0xFFFF0031
 
79
#define cOCT6100_INVALID_SERIAL_HANDLE_2        0xFFFF0032
 
80
#define cOCT6100_INVALID_SERIAL_HANDLE_3        0xFFFF0033
 
81
#define cOCT6100_INVALID_SERIAL_HANDLE_4        0xFFFF0034
 
82
 
 
83
#define cOCT6100_RELEASE_SERIAL_FAILED_0        0xFFFF0040
 
84
#define cOCT6100_RELEASE_SERIAL_FAILED_1        0xFFFF0041
 
85
#define cOCT6100_RELEASE_SERIAL_FAILED_2        0xFFFF0042
 
86
#define cOCT6100_RELEASE_SERIAL_FAILED_3        0xFFFF0043
 
87
#define cOCT6100_RELEASE_SERIAL_FAILED_4        0xFFFF0044
 
88
 
 
89
#define cOCT6100_SEIZE_SERIAL_FAILED_0          0xFFFF0050
 
90
#define cOCT6100_SEIZE_SERIAL_FAILED_1          0xFFFF0051
 
91
#define cOCT6100_SEIZE_SERIAL_FAILED_2          0xFFFF0052
 
92
#define cOCT6100_SEIZE_SERIAL_FAILED_3          0xFFFF0053
 
93
#define cOCT6100_SEIZE_SERIAL_FAILED_4          0xFFFF0054
 
94
 
 
95
#define cOCT6100_DRIVER_WRITE_FAILED_0          0xFFFF0060
 
96
#define cOCT6100_DRIVER_WRITE_FAILED_1          0xFFFF0061
 
97
#define cOCT6100_DRIVER_WRITE_FAILED_2          0xFFFF0062
 
98
#define cOCT6100_DRIVER_WRITE_FAILED_3          0xFFFF0063
 
99
#define cOCT6100_DRIVER_WRITE_FAILED_4          0xFFFF0064
 
100
 
 
101
#define cOCT6100_DRIVER_WSMEAR_FAILED_0         0xFFFF0070
 
102
#define cOCT6100_DRIVER_WSMEAR_FAILED_1         0xFFFF0071
 
103
#define cOCT6100_DRIVER_WSMEAR_FAILED_2         0xFFFF0072
 
104
#define cOCT6100_DRIVER_WSMEAR_FAILED_3         0xFFFF0073
 
105
#define cOCT6100_DRIVER_WSMEAR_FAILED_4         0xFFFF0074
 
106
 
 
107
#define cOCT6100_DRIVER_WBURST_FAILED_0         0xFFFF0080
 
108
#define cOCT6100_DRIVER_WBURST_FAILED_1         0xFFFF0081
 
109
#define cOCT6100_DRIVER_WBURST_FAILED_2         0xFFFF0082
 
110
#define cOCT6100_DRIVER_WBURST_FAILED_3         0xFFFF0083
 
111
#define cOCT6100_DRIVER_WBURST_FAILED_4         0xFFFF0084
 
112
 
 
113
#define cOCT6100_DRIVER_READ_FAILED_0           0xFFFF0090
 
114
#define cOCT6100_DRIVER_READ_FAILED_1           0xFFFF0091
 
115
#define cOCT6100_DRIVER_READ_FAILED_2           0xFFFF0092
 
116
#define cOCT6100_DRIVER_READ_FAILED_3           0xFFFF0093
 
117
#define cOCT6100_DRIVER_READ_FAILED_4           0xFFFF0094
 
118
 
 
119
#define cOCT6100_DRIVER_RBURST_FAILED_0         0xFFFF00A0
 
120
#define cOCT6100_DRIVER_RBURST_FAILED_1         0xFFFF00A1
 
121
#define cOCT6100_DRIVER_RBURST_FAILED_2         0xFFFF00A2
 
122
#define cOCT6100_DRIVER_RBURST_FAILED_3         0xFFFF00A3
 
123
#define cOCT6100_DRIVER_RBURST_FAILED_4         0xFFFF00A4
 
124
 
 
125
 
 
126
 
 
127
 
 
128
 
 
129
/*****************************  TYPES  ***************************************/
 
130
 
 
131
/*Change this type if your platform uses 64bits semaphores/locks */ 
 
132
typedef UINT32 tOCT6100_USER_SERIAL_OBJECT;
 
133
 
 
134
typedef struct _OCT6100_GET_TIME_
 
135
{
 
136
        PVOID   pProcessContext;
 
137
        UINT32  aulWallTimeUs[ 2 ];
 
138
 
 
139
} tOCT6100_GET_TIME, *tPOCT6100_GET_TIME;
 
140
 
 
141
 
 
142
 
 
143
 
 
144
 
 
145
typedef struct _OCT6100_CREATE_SERIALIZE_OBJECT_
 
146
{
 
147
        PVOID                                           pProcessContext;
 
148
        PSZ                                                     pszSerialObjName;
 
149
        tOCT6100_USER_SERIAL_OBJECT     ulSerialObjHndl;
 
150
 
 
151
} tOCT6100_CREATE_SERIALIZE_OBJECT, *tPOCT6100_CREATE_SERIALIZE_OBJECT;
 
152
 
 
153
 
 
154
typedef struct _OCT6100_DESTROY_SERIALIZE_OBJECT_
 
155
{
 
156
        PVOID                                           pProcessContext;
 
157
        tOCT6100_USER_SERIAL_OBJECT     ulSerialObjHndl;
 
158
 
 
159
} tOCT6100_DESTROY_SERIALIZE_OBJECT, *tPOCT6100_DESTROY_SERIALIZE_OBJECT;
 
160
 
 
161
 
 
162
typedef struct _OCT6100_SEIZE_SERIALIZE_OBJECT_
 
163
{
 
164
        PVOID                                           pProcessContext;
 
165
        tOCT6100_USER_SERIAL_OBJECT     ulSerialObjHndl;
 
166
        UINT32                                          ulTryTimeMs;
 
167
 
 
168
} tOCT6100_SEIZE_SERIALIZE_OBJECT, *tPOCT6100_SEIZE_SERIALIZE_OBJECT;
 
169
 
 
170
 
 
171
typedef struct _OCT6100_RELEASE_SERIALIZE_OBJECT_
 
172
{
 
173
        PVOID                                           pProcessContext;
 
174
        tOCT6100_USER_SERIAL_OBJECT     ulSerialObjHndl;
 
175
 
 
176
} tOCT6100_RELEASE_SERIALIZE_OBJECT, *tPOCT6100_RELEASE_SERIALIZE_OBJECT;
 
177
 
 
178
 
 
179
typedef struct _OCT6100_WRITE_PARAMS_
 
180
{
 
181
        PVOID   pProcessContext;
 
182
 
 
183
        UINT32  ulUserChipId;
 
184
        UINT32  ulWriteAddress;
 
185
        UINT16  usWriteData;
 
186
 
 
187
} tOCT6100_WRITE_PARAMS, *tPOCT6100_WRITE_PARAMS;
 
188
 
 
189
 
 
190
typedef struct _OCT6100_WRITE_SMEAR_PARAMS_
 
191
{
 
192
        PVOID   pProcessContext;
 
193
 
 
194
        UINT32  ulUserChipId;
 
195
        UINT32  ulWriteAddress;
 
196
        UINT32  ulWriteLength;
 
197
        UINT16  usWriteData;
 
198
 
 
199
} tOCT6100_WRITE_SMEAR_PARAMS, *tPOCT6100_WRITE_SMEAR_PARAMS;
 
200
 
 
201
 
 
202
typedef struct _OCT6100_WRITE_BURST_PARAMS_
 
203
{
 
204
        PVOID   pProcessContext;
 
205
 
 
206
        UINT32  ulUserChipId;
 
207
        UINT32  ulWriteAddress;
 
208
        UINT32  ulWriteLength;
 
209
        PUINT16 pusWriteData;
 
210
 
 
211
} tOCT6100_WRITE_BURST_PARAMS, *tPOCT6100_WRITE_BURST_PARAMS;
 
212
 
 
213
 
 
214
typedef struct _OCT6100_READ_PARAMS_
 
215
{
 
216
        PVOID   pProcessContext;
 
217
 
 
218
        UINT32  ulUserChipId;
 
219
        UINT32  ulReadAddress;
 
220
        PUINT16 pusReadData;
 
221
 
 
222
} tOCT6100_READ_PARAMS, *tPOCT6100_READ_PARAMS;
 
223
 
 
224
 
 
225
typedef struct _OCT6100_READ_BURST_PARAMS_
 
226
{
 
227
        PVOID   pProcessContext;
 
228
 
 
229
        UINT32  ulUserChipId;
 
230
        UINT32  ulReadAddress;
 
231
        UINT32  ulReadLength;
 
232
        PUINT16 pusReadData;
 
233
 
 
234
} tOCT6100_READ_BURST_PARAMS, *tPOCT6100_READ_BURST_PARAMS;
 
235
 
 
236
 
 
237
 
 
238
 
 
239
 
 
240
 
 
241
 
 
242
 
 
243
/************************** FUNCTION PROTOTYPES  *****************************/
 
244
 
 
245
/* Time function. */
 
246
UINT32 Oct6100UserGetTime(
 
247
                                IN OUT  tPOCT6100_GET_TIME                                      f_pTime );
 
248
 
 
249
 
 
250
 
 
251
/* Memory management functions. */
 
252
UINT32 Oct6100UserMemSet(
 
253
                                IN              PVOID                                                           f_pAddress,
 
254
                                IN              UINT32                                                          f_ulPattern,
 
255
                                IN              UINT32                                                          f_ulLength );
 
256
 
 
257
UINT32 Oct6100UserMemCopy(
 
258
                                IN              PVOID                                                           f_pDestination,
 
259
                                IN              const void                                                      *f_pSource,
 
260
                                IN              UINT32                                                          f_ulLength );
 
261
 
 
262
/* Serialization functions. */
 
263
UINT32 Oct6100UserCreateSerializeObject(
 
264
                                IN OUT tPOCT6100_CREATE_SERIALIZE_OBJECT        f_pCreate);
 
265
 
 
266
UINT32 Oct6100UserDestroySerializeObject(
 
267
                                IN tPOCT6100_DESTROY_SERIALIZE_OBJECT           f_pDestroy);
 
268
 
 
269
UINT32 Oct6100UserSeizeSerializeObject(
 
270
                                IN tPOCT6100_SEIZE_SERIALIZE_OBJECT                     f_pSeize);
 
271
 
 
272
UINT32 Oct6100UserReleaseSerializeObject(
 
273
                                IN tPOCT6100_RELEASE_SERIALIZE_OBJECT           f_pRelease);
 
274
 
 
275
/* Read/Write functions.*/
 
276
UINT32 Oct6100UserDriverWriteApi(
 
277
                                IN      tPOCT6100_WRITE_PARAMS                                  f_pWriteParams );
 
278
 
 
279
UINT32 Oct6100UserDriverWriteOs(
 
280
                                IN      tPOCT6100_WRITE_PARAMS                                  f_pWriteParams );
 
281
 
 
282
UINT32 Oct6100UserDriverWriteSmearApi(
 
283
                                IN      tPOCT6100_WRITE_SMEAR_PARAMS                    f_pSmearParams );
 
284
 
 
285
UINT32 Oct6100UserDriverWriteSmearOs(
 
286
                                IN      tPOCT6100_WRITE_SMEAR_PARAMS                    f_pSmearParams );
 
287
 
 
288
UINT32 Oct6100UserDriverWriteBurstApi(
 
289
                                IN      tPOCT6100_WRITE_BURST_PARAMS                    f_pBurstParams );
 
290
 
 
291
UINT32 Oct6100UserDriverWriteBurstOs(
 
292
                                IN      tPOCT6100_WRITE_BURST_PARAMS                    f_pBurstParams );
 
293
 
 
294
UINT32 Oct6100UserDriverReadApi(
 
295
                                IN OUT  tPOCT6100_READ_PARAMS                           f_pReadParams );
 
296
 
 
297
UINT32 Oct6100UserDriverReadOs(
 
298
                                IN OUT  tPOCT6100_READ_PARAMS                           f_pReadParams );
 
299
 
 
300
UINT32 Oct6100UserDriverReadBurstApi(
 
301
                                IN OUT  tPOCT6100_READ_BURST_PARAMS                     f_pBurstParams );
 
302
 
 
303
UINT32 Oct6100UserDriverReadBurstOs(
 
304
                                IN OUT  tPOCT6100_READ_BURST_PARAMS                     f_pBurstParams );
 
305
 
 
306
 
 
307
 
 
308
 
 
309
 
 
310
 
 
311
 
 
312
#endif /* __OCT6100_APIUD_H__ */