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