dcl_irda.h
7.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2001
*
*****************************************************************************/
/*****************************************************************************
*
* Filename:
* ---------
* dcl_irda.h
*
* Project:
* --------
* Maui
*
* Description:
* ------------
* Header file of DCL (Driver Common Layer) for IrDA.
*
* Author:
* -------
* -------
*
*============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*============================================================================
****************************************************************************/
#ifdef DCL_DEFINITION_STRUCT
#ifndef __DCL_IRDA_H_STRUCT__
#define __DCL_IRDA_H_STRUCT__
/*******************************************************************************
* DCL_OPTIONS for IRDA
*******************************************************************************/
#define IRDA_OPTIONS
/*******************************************************************************
* DCL_CONFIGURE_T
*******************************************************************************/
typedef struct
{
DCL_BOOL fgModulation1p63;
DCL_BOOL fgBOFType0xff;
DCL_UINT8 uMirDoubleStaNum;
#define DCL_MIR_DOUBLE_STA_DEFAULT 0x7f
#define DCL_MIR_DOUBLE_STA_MAX 0x7f
} IRDA_CONFIG_T;
#define IRDA_CONFIGS \
IRDA_CONFIG_T rIRDACofig;
/*******************************************************************************
* DCL_EVENT for IRDA
*******************************************************************************/
#define IRDA_EVENTS
/*******************************************************************************
* DCL_CTRL_CMD for IRDA
*******************************************************************************/
#define IRDA_CMDS
/*******************************************************************************
* DCL_CTRL_DATA_T: Define the Control data structure for each module's command
*******************************************************************************/
#define IRDA_CTRLS
#endif // #ifndef __DCL_IRDA_H_STRUCT__
#endif // #ifdef DCL_DEFINITION_STRUCT
#if defined(DCL_DEFINITION_PROTOTYPE)
#ifndef __DCL_IRDA_H_PROTOTYPE__
#define __DCL_IRDA_H_PROTOTYPE__
// MoDIS parser skip start
/*************************************************************************
* FUNCTION
* DclIRDA_Initialize
*
* DESCRIPTION
* This function is to initialize IRDA module.
*
* PARAMETERS
* DCL_STATUS_OK
* STATUS_UNSUPPORTED - IrDA is not supported or enabled.
*
* RETURNS
* none
*
*************************************************************************/
extern DCL_STATUS DclIRDA_Initialize(void);
/*************************************************************************
* FUNCTION
* DclIRDA_Open
*
* DESCRIPTION
* This function is to open the IRDA module and get a handle. Note that
* multiple opens are not allowed.
*
* PARAMETERS
* eDev - only valid for DCL_IRDA
* flags - no sepcial flags is needed. Please use FLAGS_NONE
*
* RETURNS
* DCL_HANDLE_INVALID - Open failed.
* STATUS_UNSUPPORTED - IrDA is not supported or enabled.
* other value - a valid handle
*
*************************************************************************/
extern DCL_HANDLE DclIRDA_Open(DCL_DEV eDev, DCL_FLAGS flags);
/*************************************************************************
* FUNCTION
* DclIRDA_ReadData
*
* DESCRIPTION
* This function is not supported for the IRDA module now.
*
* PARAMETERS
* N/A
*
* RETURNS
* STATUS_UNSUPPORTED
*
*************************************************************************/
extern DCL_STATUS DclIRDA_ReadData(DCL_HANDLE handle, DCL_BUFF *buff, DCL_BUFF_LEN *buf_len, DCL_OPTIONS options);
/*************************************************************************
* FUNCTION
* DclIRDA_WriteData
*
* DESCRIPTION
* This function is not supported for the IRDA module now.
*
* PARAMETERS
* N/A
*
* RETURNS
* STATUS_UNSUPPORTED
*
*************************************************************************/
extern DCL_STATUS DclIRDA_WriteData(DCL_HANDLE handle, DCL_BUFF *buff, DCL_BUFF_LEN *buf_len, DCL_OPTIONS options);
/*************************************************************************
* FUNCTION
* DclIRDA_Configure
*
* DESCRIPTION
* This function is to configure for the IRDA module.
*
* PARAMETERS
* handle - a valid handle return by DclIRDA_Open()
* configure - a ponter to IRDAT_CONFIG_T structure which is a member of union
* DCL_CONFIGURE_T.
*
* RETURNS
* STATUS_OK - successfully set the configuratuib.
* STATUS_INVALID_HANDLE - It's a invalid handle.
* STATUS_UNSUPPORTED - IrDA is not supported or enabled.
*
*************************************************************************/
extern DCL_STATUS DclIRDA_Configure(DCL_HANDLE handle, DCL_CONFIGURE_T *configure);
/*************************************************************************
* FUNCTION
* DclIRDA_RegisterCallback
*
* DESCRIPTION
* This function is not supported for the IRDA module now.
*
* PARAMETERS
* N/A
*
* RETURNS
* STATUS_UNSUPPORTED
*
*************************************************************************/
extern DCL_STATUS DclIRDA_RegisterCallback(DCL_HANDLE handle, DCL_EVENT event, PFN_DCL_CALLBACK callback);
/*************************************************************************
* FUNCTION
* DclIRDA_Control
*
* DESCRIPTION
* This function is not supported for the IRDA module now.
*
* PARAMETERS
* N/A
*
* RETURNS
* STATUS_UNSUPPORTED
*
*************************************************************************/
extern DCL_STATUS DclIRDA_Control(DCL_HANDLE handle, DCL_CTRL_CMD cmd, DCL_CTRL_DATA_T *data);
/*************************************************************************
* FUNCTION
* DclIRDA_Close
*
* DESCRIPTION
* This function is to close the IRDA module.
*
* PARAMETERS
* handle - hanlde previous got from DclIRDA_Open()
*
* RETURNS
* DCL_STATUS_OK - successfully close the IRDA module.
* STATUS_NOT_OPENED - IrDA hasn't been opened yet.
* STATUS_INVALID_HANDLE - It's a invalid handle.
* STATUS_UNSUPPORTED - IrDA is not supported or enabled.
*
*************************************************************************/
extern DCL_STATUS DclIRDA_Close(DCL_HANDLE handle);
// MoDIS parser skip end
#endif // #ifndef __DCL_IRDA_H_PROTOTYPE__
#endif // #ifdef DCL_DEFINITION_PROTOTYPE