blob: 5ba9ad7b531b45c5d3849cda2f5355707359aae6 [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) 2010
8*
9* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
10* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
11* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
12* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
13* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
14* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
15* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
16* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
17* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
18* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
19* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
20* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
21*
22* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
23* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
24* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
25* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
26* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
27*
28* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
29* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
30* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
31* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
32* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
33*
34*****************************************************************************/
35
36/*****************************************************************************
37 *
38 * Filename:
39 * ---------
40 * dcl_idc.h
41 *
42 * Project:
43 * --------
44 * MOLY_Software
45 *
46 * Description:
47 * ------------
48 * Header file of DCL (Driver Common Layer) for IDC.
49 *
50 * Author:
51 * -------
52 *
53 * Ansel Liao
54 *
55 *============================================================================
56 * HISTORY
57 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
58 *------------------------------------------------------------------------------
59 * removed!
60 * removed!
61 * removed!
62 *
63 * removed!
64 * removed!
65 * removed!
66 *
67 * removed!
68 * removed!
69 * removed!
70 * removed!
71 *
72 * removed!
73 * removed!
74 * removed!
75 * removed!
76 *
77 * removed!
78 * removed!
79 * removed!
80 * removed!
81 *
82 * removed!
83 * removed!
84 * removed!
85 * removed!
86 *
87 * removed!
88 * removed!
89 * removed!
90 * removed!
91 *
92 * removed!
93 * removed!
94 * removed!
95 * removed!
96 * removed!
97 *
98 * removed!
99 * removed!
100 * removed!
101 * removed!
102 *
103 * removed!
104 * removed!
105 * removed!
106 * removed!
107 *
108 * removed!
109 * removed!
110 * removed!
111 * removed!
112 *
113 * removed!
114 * removed!
115 * removed!
116 * removed!
117 * removed!
118 *
119 * removed!
120 * removed!
121 * removed!
122 *
123 * removed!
124 * removed!
125 * removed!
126 *
127 * removed!
128 * removed!
129 * removed!
130 *
131 * removed!
132 * removed!
133 * removed!
134 *
135 * removed!
136 * removed!
137 * removed!
138 *
139 * removed!
140 * removed!
141 * removed!
142 *
143 * removed!
144 * removed!
145 * removed!
146 * removed!
147 *
148 * removed!
149 * removed!
150 * removed!
151 *
152 * removed!
153 * removed!
154 * removed!
155 *
156 * removed!
157 * removed!
158 * removed!
159 * removed!
160 *------------------------------------------------------------------------------
161 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
162 *============================================================================
163 ****************************************************************************/
164
165#ifdef DCL_DEFINITION_STRUCT
166#ifndef __DCL_IDC_H_STRUCT__
167#define __DCL_IDC_H_STRUCT__
168
169#include "kal_general_types.h"
170
171#define MAX_NUM_BYTE 9
172#ifdef ATEST_DRV_ENABLE
173#define MAX_NUM_EVENT 16
174#else /*ATEST_DRV_ENABLE*/
175#define MAX_NUM_EVENT 1
176#endif
177
178
179#if defined(__MD93__)
180 typedef void (*IDC_DRV_TO_EL1_CALLBACK)(kal_bool data);
181#elif defined(__MD95__) || defined(__MD97__) || defined(__MD97P__)
182 typedef void (*IDC_DRV_TO_EL1_CALLBACK)(void *data);
183#endif
184
185
186/*******************************************************************************
187 * DCL_OPTIONS for IDC
188 *******************************************************************************/
189#define IDC_OPTIONS
190
191
192/*******************************************************************************
193 * DCL_CONFIGURE_T for IDC
194 *******************************************************************************/
195#define IDC_CONFIGS
196
197
198/*******************************************************************************
199 * DCL_EVENT for IDC
200 *******************************************************************************/
201#define IDC_EVENTS
202
203
204/*******************************************************************************
205 * DCL_CTRL_CMD for IDC
206 *******************************************************************************/
207/* The IDC Command Values in DCL_CTRL_CMD_T Enum of dcl.h */
208#ifdef __BUILD_DOM__
209typedef enum {
210 IDC_CMD_SET_DCB_CONFIG,
211 IDC_CMD_GET_DCB_CONFIG,
212 IDC_CMD_SET_BAUDRATE,
213 IDC_CMD_GET_MAX_BAUDRATE,
214 IDC_CMD_SET_FIFO_TRIGGER,
215 IDC_CMD_SET_PM_CONFIG,
216 IDC_CMD_GET_PM_CONFIG,
217 IDC_CMD_SEND_EVENT,
218 IDC_CMD_SCHEDULE_EVENT,
219 IDC_CMD_SCHEDULE_GPS_BLANK_EVENT,
220 IDC_CMD_SCHEDULE_GPS_L1_L5_BLANK_EVENT,
221 IDC_CMD_SCHEDULE_UPDATE,
222 IDC_CMD_PURGE,
223 IDC_CMD_CHECK_EVENT_SEND_OUT,
224 IDC_CMD_SET_PIN_CONFIG,
225 IDC_CMD_GET_PIN_CONFIG,
226 IDC_CMD_REGISTER_PM_CALLBACK,
227 IDC_CMD_UNREGISTER_PM_CALLBACK,
228 IDC_CMD_SET_NEW_PM_CONFIG,
229 IDC_CMD_GET_NEW_PM_CONFIG,
230 IDC_CMD_STOP_EVENT,
231 IDC_CMD_GET_SCHEDULE_STATUS,
232 IDC_CMD_GET_SCHEDULE_STATUS_2,
233 IDC_CMD_FORCE_ON_RF,
234 IDC_CMD_REMAPPING_CONFIG,
235 IDC_CMD_AUTO_TX_CONFIG,
236 IDC_CMD_AUTO_TX_EN,
237 IDC_CMD_SCHEDULE_UPDATE_N_RETRUN_RFTX,
238 IDC_CMD_SCHEDULE_EVENT_LTE_NR,
239 IDC_CMD_ENABLE_RAT,
240 IDC_CMD_DISABLE_RAT,
241 IDC_CMD_SLEEP_NOTIFY,
242 IDC_CMD_WAKE_NOTIFY,
243 IDC_CMD_SET_ILM,
244 IDC_CMD_GPS_B13_B14,
245} DCL_CTRL_CMD_T;
246#else // __BUILD_DOM__
247#define IDC_CMDS \
248 IDC_CMD_SET_DCB_CONFIG, \
249 IDC_CMD_GET_DCB_CONFIG, \
250 IDC_CMD_SET_BAUDRATE, \
251 IDC_CMD_GET_MAX_BAUDRATE, \
252 IDC_CMD_SET_FIFO_TRIGGER, \
253 IDC_CMD_SET_PM_CONFIG, \
254 IDC_CMD_GET_PM_CONFIG, \
255 IDC_CMD_SEND_EVENT, \
256 IDC_CMD_SCHEDULE_EVENT, \
257 IDC_CMD_SCHEDULE_GPS_BLANK_EVENT, \
258 IDC_CMD_SCHEDULE_GPS_L1_L5_BLANK_EVENT, \
259 IDC_CMD_SCHEDULE_UPDATE, \
260 IDC_CMD_PURGE, \
261 IDC_CMD_CHECK_EVENT_SEND_OUT, \
262 IDC_CMD_SET_PIN_CONFIG, \
263 IDC_CMD_GET_PIN_CONFIG, \
264 IDC_CMD_REGISTER_PM_CALLBACK, \
265 IDC_CMD_UNREGISTER_PM_CALLBACK, \
266 IDC_CMD_SET_NEW_PM_CONFIG, \
267 IDC_CMD_GET_NEW_PM_CONFIG, \
268 IDC_CMD_STOP_EVENT, \
269 IDC_CMD_GET_SCHEDULE_STATUS, \
270 IDC_CMD_GET_SCHEDULE_STATUS_2, \
271 IDC_CMD_FORCE_ON_RF, \
272 IDC_CMD_REMAPPING_CONFIG, \
273 IDC_CMD_AUTO_TX_CONFIG, \
274 IDC_CMD_AUTO_TX_EN, \
275 IDC_CMD_SCHEDULE_UPDATE_N_RETRUN_RFTX, \
276 IDC_CMD_SCHEDULE_EVENT_LTE_NR, \
277 IDC_CMD_ENABLE_RAT, \
278 IDC_CMD_DISABLE_RAT, \
279 IDC_CMD_SLEEP_NOTIFY, \
280 IDC_CMD_WAKE_NOTIFY, \
281 IDC_CMD_SET_ILM, \
282 IDC_CMD_GPS_B13_B14,
283#endif // __BUILD_DOM__
284
285
286/*******************************************************************************
287 * DCL_CTRL_DATA_T: Define the Control data structure for each module's command
288 *******************************************************************************/
289// For DclIDC_Initialize
290typedef enum
291{
292 IDC_INIT,
293 IDC_REINIT,
294 IDC_UART_ACTIVATE,
295} IDC_INIT_TYPE_T;
296
297// For IDC_CMD_SET_DCB_CONFIG command
298// For IDC_CMD_GET_DCB_CONFIG command
299typedef struct
300{
301 kal_uint32 u4Baud; // baudrate
302 kal_uint8 u1DataBits; // UART_BITS_PER_CHAR_T
303 kal_uint8 u1StopBits; // UART_STOP_BITS_T
304 kal_uint8 u1Parity; // UART_PARTIY_T
305} IDC_CTRL_DCB_CONFIG_T;
306
307// For IDC_CMD_SET_BAUDRATE command
308// For IDC_CMD_GET_MAX_BAUDRATE command
309typedef struct
310{
311 kal_uint32 baudrate; // baudrate
312} IDC_CTRL_BAUDRATE_T;
313
314// For IDC_CMD_SET_FIFO_TRIGGER command
315typedef struct
316{
317 kal_uint8 rx_threshold; // threshold of RX FIFO
318} IDC_CTRL_SET_FIFO_TRIGGER_T;
319
320// For IDC_CMD_SET_PM_CONFIG command
321// For IDC_CMD_GET_PM_CONFIG command
322typedef struct
323{
324 kal_uint8 pm_idx; // Pattern match index
325 kal_uint8 priority; // Priority
326 kal_uint8 priority_bit_en;// Priority bit enable
327 kal_uint8 pattern; // Pattern
328 kal_uint8 pattern_bit_en; // Pattern bit enable
329} IDC_CTRL_PM_CONFIG_T;
330
331// For IDC_CMD_SET_NEW_PM_CONFIG command
332// For IDC_CMD_GET_NEW_PM_CONFIG command
333typedef struct
334{
335 kal_uint8 pattern0; // Pattern 0
336 kal_uint8 pattern1; // Pattern 1
337} IDC_CTRL_NEW_PM_CONFIG_T;
338
339// For IDC_REGISTER_PM_CALLBACK command
340// For IDC_UNREGISTER_PM_CALLBACK command
341typedef struct
342{
343 kal_uint8 pm_idx; // Pattern match index , 0~3 : old PM, 4: new PM
344 IDC_DRV_TO_EL1_CALLBACK func_ptr; // Callback function
345#if defined(__MD93__)
346 kal_bool private_data;// Private data
347#elif defined(__MD95__) || defined(__MD97__) || defined(__MD97P__)
348 void *private_data;// old PM -> kal_bool, new PM -> kal_uint16
349#endif
350} IDC_CTRL_PM_CALLBACK_T;
351
352
353// For IDC_CMD_SCHEDULE_EVENT command
354typedef struct
355{
356#if defined(__MD93__)
357 kal_uint8 data[2];
358#elif defined(__MD95__) || defined(__MD97__) || defined(__MD97P__)
359 kal_uint8 num; // number of byte in the event
360 kal_uint8 data[MAX_NUM_BYTE]; // 2~9 byte data per event
361#endif
362 kal_uint32 offset; // 97: 1000 = 1 ms, can be set up to 10000 (= 10 ms) *** 95: 61440 = 1 ms, can be set up to 614400 (= 10 ms)
363} IDC_EVENT_T;
364
365typedef struct
366{
367 kal_uint8 cmd_type;
368 kal_uint8 cmd_sub_type;
369 kal_uint32 cmd_phytime;
370 kal_uint8 event_type;
371} IDC_CTRL_DROP_CMD_T;
372
373typedef struct
374{
375 IDC_EVENT_T schedule_event; // event columns
376 kal_bool sleep_mode; // Use KAL_TRUE to lock resource
377 kal_bool gps_mode; // Use KAL_TRUE to notify gps to blank
378 IDC_CTRL_DROP_CMD_T *drop_cmd; // drop_cmd structure for DRV_IDC fill in if drop behavior occurs
379} IDC_CTRL_SCHEDULE_EVENT_T;
380
381typedef struct
382{
383 kal_uint8 rat_status; // rat_lte = 0, rat_nr = 1
384 kal_uint8 raw_data; // L1: bit[0], L5:bit[1], if value = 0x0 : gps_off, value = 0x1 : gps_on
385 kal_uint32 frc_time; //1000 = 1 ms, can be set up to 10000 (= 10 ms)
386} IDC_CTRL_GPS_L1_L5_BLANK_EVENT_T;
387
388typedef struct
389{
390 kal_uint8 rat_status; // rat_lte = 0, rat_nr = 1
391 kal_bool gps_mode; // Using KAL_TRUE to ON GPS blank,KAL_FALSE to OFF GPS blank
392 kal_uint32 frc_time; //1000 = 1 ms, can be set up to 10000 (= 10 ms)
393} IDC_CTRL_GPS_SINGLE_BLANK_EVENT_T;
394
395
396// For IDC_CMD_SCHEDULE_UPDATE command
397typedef struct
398{
399 kal_uint32 phy_time_set; // According to sub frame boundary, range = 0 ~ 61440*n (n: last sub frame boundary, 61440 = 1ms)
400} IDC_CTRL_SCHEDULE_UPDATE_T;
401
402// For IDC_CMD_STOP_EVENT command
403typedef struct
404{
405 kal_uint32 bitmap; // events need to be stopped
406} IDC_CTRL_STOP_EVENT_T;
407
408// For IDC_CMD_PURGE
409typedef struct
410{
411 UART_buffer dir;
412} IDC_CTRL_PURGE_T;
413
414// For IDC_CMD_GET_SCHEDULE_STATUS
415typedef struct
416{
417 kal_uint32 schedule_status; // (bitmap)
418} IDC_CTRL_GET_SCHEDULE_STATUS_T;
419
420// For IDC_CMD_CHECK_EVENT_SEND_OUT
421typedef struct
422{
423 kal_bool send_out; // all events are sent out
424} IDC_CTRL_CHECK_EVENT_SEND_OUT_T;
425
426// For IDC_CMD_SET_PIN_CONFIG
427typedef enum
428{
429 IDC_INTERNAL_PIN,
430 IDC_EXTERNAL_PIN,
431} IDC_PIN_MODE_T;
432
433typedef struct
434{
435 IDC_PIN_MODE_T pin_mode;
436} IDC_CTRL_PIN_CONFIG_T;
437
438typedef struct
439{
440 kal_uint8 rf_path; // 0: rf path 0, 1: rf path 1
441} IDC_CTRL_RF_PATH_T;
442
443typedef struct
444{
445 kal_uint8 remapping_table; // remapping table config
446 kal_uint8 remapping_table_en; // remapping table enable
447} IDC_CTRL_REMAPPING_CONFIG_T;
448
449typedef struct
450{
451 kal_uint8 tx_susp_quota; // it count down when receive REVOKE IDC_CMD, usually set 30ms, 1ms per unit
452 kal_uint8 reset_quota; // it count down when start auto tx system, usually set 200ms, 1ms per unit
453} IDC_AUTO_TX_CONFIG_T;
454
455typedef struct
456{
457 kal_bool auto_tx_en; // KAL_TRUE : auto tx on, KAL_FALSE : auto tx off
458} IDC_AUTO_TX_EN_T;
459
460// For IDC_CMD_SCHEDULE_UPDATE_N_RETRUN_RFTX command
461typedef struct
462{
463 kal_uint8 rat_status; // rat_lte = 0, rat_nr = 1
464
465} IDC_RAT_T;
466typedef struct
467{
468 kal_bool ilm_mode; // 0 : ILM_DISABLE, 1 : ILM_ENABLE
469
470} IDC_ILM_T;
471typedef struct
472{
473 kal_uint8 rat_status; // rat_lte = 0, rat_nr = 1
474 kal_uint16 raw_data; // rat_lte: bit[0:1], rat_nr:bit[2]
475} IDC_GPS_B13_B14_T;
476
477typedef struct
478{
479 kal_uint32 frc_time_set; // According to sub frame boundary, range = 0 ~ 1000*n (n: last sub frame boundary, 1000 = 1ms)
480 kal_uint8 rf_path_status; // returns RF status to MD_IDC
481
482} IDC_CTRL_SCHEDULE_UPDATE_N_RETRUN_RFTX_T;
483
484typedef struct
485{
486 IDC_EVENT_T schedule_event; // event columns
487 kal_bool sleep_mode; // Use KAL_TRUE to lock resource
488 kal_uint8 event_type; // LTE/NR/Common
489 IDC_CTRL_DROP_CMD_T *drop_cmd; // drop_cmd structure for DRV_IDC fill in if drop behavior occurs
490} IDC_CTRL_SCHEDULE_EVENT_LTE_NR_T;
491
492/* The IDC Command Parameter Data Structure for Each Command in DCL_CTRL_DATA_T Enum of dcl.h */
493#ifdef __BUILD_DOM__
494typedef union
495{
496 IDC_CTRL_DCB_CONFIG_T r_idc_ctrl_dcb_config; // Data Structure for IDC_CMD_SET_DCB_CONFIG, IDC_CMD_GET_DCB_CONFIG
497 IDC_CTRL_BAUDRATE_T r_idc_ctrl_baudrate; // Data Structure for IDC_CMD_SET_BAUDRATE, IDC_CMD_GET_MAX_BAUDRATE
498 IDC_CTRL_SET_FIFO_TRIGGER_T r_idc_ctrl_set_fifo_trigger; // Data Structure for IDC_CMD_SET_FIFO_TRIGGER
499 IDC_CTRL_PM_CONFIG_T r_idc_ctrl_pm_config; // Data Structure for IDC_CMD_SET_PM_CONFIG, IDC_CMD_GET_PM_CONFIG
500 IDC_CTRL_NEW_PM_CONFIG_T r_idc_ctrl_new_pm_config; // Data Structure for IDC_CMD_SET_NEW_PM_CONFIG, IDC_CMD_GET_NEW_PM_CONFIG
501 IDC_CTRL_SCHEDULE_EVENT_T r_idc_ctrl_schedule_event; // Data Structure for IDC_CMD_SCHEDULE_EVENT
502 IDC_CTRL_GPS_SINGLE_BLANK_EVENT_T r_idc_ctrl_gps_single_blank_event; // Data Structure for IDC_CMD_GPS_SINGLE_BLANK_EVENT
503 IDC_CTRL_GPS_L1_L5_BLANK_EVENT_T r_idc_ctrl_gps_l1_l5_blank_event; // Data Structure for IDC_CMD_GPS_L1_L5_BLANK_EVENT
504 IDC_CTRL_SCHEDULE_UPDATE_T r_idc_ctrl_schedule_start; // Data Structure for IDC_CMD_SCHEDULE_EVENT
505 IDC_CTRL_STOP_EVENT_T r_idc_ctrl_stop_event; // Data Structure for IDC_CMD_STOP_EVENT
506 IDC_CTRL_PURGE_T r_idc_ctrl_purge; // Data Structure for IDC_CMD_PURGE
507 IDC_CTRL_GET_SCHEDULE_STATUS_T r_idc_ctrl_get_schedule_status; // Data Structure for IDC_CMD_GET_SCHEDULE_STATUS
508 IDC_CTRL_CHECK_EVENT_SEND_OUT_T r_idc_ctrl_check_event_send_out; // Data Structure for IDC_CMD_CHECK_EVENT_SEND_OUT
509 IDC_CTRL_PIN_CONFIG_T r_idc_ctrl_pin_config; // Data Structure for IDC_CTRL_PIN_CONFIG_T
510 IDC_CTRL_PM_CALLBACK_T r_idc_ctrl_pm_callback;
511 IDC_CTRL_RF_PATH_T r_idc_ctrl_rf_path;
512 IDC_CTRL_REMAPPING_CONFIG_T r_idc_ctrl_remapping_config;
513 IDC_AUTO_TX_CONFIG_T r_idc_ctrl_auto_tx_config;
514 IDC_AUTO_TX_EN_T r_idc_ctrl_auto_tx_en;
515 IDC_CTRL_SCHEDULE_UPDATE_N_RETRUN_RFTX_T r_idc_ctrl_schedule_update_n_return_rftx;
516 IDC_CTRL_SCHEDULE_EVENT_LTE_NR_T r_idc_ctrl_schedule_event_lte_nr;
517 IDC_RAT_T r_idc_ctrl_rat_status;
518 IDC_ILM_T r_idc_ctrl_ilm_mode;
519 IDC_GPS_B13_B14_T r_idc_ctrl_gps_b13_b14_mode;
520} DCL_CTRL_DATA_T;
521#else /* __BUILD_DOM__ */
522#define IDC_CTRLS \
523 IDC_CTRL_DCB_CONFIG_T r_idc_ctrl_dcb_config; \
524 IDC_CTRL_BAUDRATE_T r_idc_ctrl_baudrate; \
525 IDC_CTRL_SET_FIFO_TRIGGER_T r_idc_ctrl_set_fifo_trigger; \
526 IDC_CTRL_PM_CONFIG_T r_idc_ctrl_pm_config; \
527 IDC_CTRL_SCHEDULE_EVENT_T r_idc_ctrl_schedule_event; \
528 IDC_CTRL_GPS_SINGLE_BLANK_EVENT_T r_idc_ctrl_gps_single_blank_event; \
529 IDC_CTRL_GPS_L1_L5_BLANK_EVENT_T r_idc_ctrl_gps_l1_l5_blank_event; \
530 IDC_CTRL_SCHEDULE_UPDATE_T r_idc_ctrl_schedule_start; \
531 IDC_CTRL_STOP_EVENT_T r_idc_ctrl_stop_event; \
532 IDC_CTRL_PURGE_T r_idc_ctrl_purge; \
533 IDC_CTRL_GET_SCHEDULE_STATUS_T r_idc_ctrl_get_schedule_status; \
534 IDC_CTRL_CHECK_EVENT_SEND_OUT_T r_idc_ctrl_check_event_send_out; \
535 IDC_CTRL_PIN_CONFIG_T r_idc_ctrl_pin_config; \
536 IDC_CTRL_PM_CALLBACK_T r_idc_ctrl_pm_callback; \
537 IDC_CTRL_NEW_PM_CONFIG_T r_idc_ctrl_new_pm_config; \
538 IDC_CTRL_RF_PATH_T r_idc_ctrl_rf_path; \
539 IDC_CTRL_REMAPPING_CONFIG_T r_idc_ctrl_remapping_config; \
540 IDC_AUTO_TX_CONFIG_T r_idc_ctrl_auto_tx_config; \
541 IDC_AUTO_TX_EN_T r_idc_ctrl_auto_tx_en; \
542 IDC_CTRL_SCHEDULE_UPDATE_N_RETRUN_RFTX_T r_idc_ctrl_schedule_update_n_return_rftx; \
543 IDC_CTRL_SCHEDULE_EVENT_LTE_NR_T r_idc_ctrl_schedule_event_lte_nr; \
544 IDC_RAT_T r_idc_ctrl_rat_status; \
545 IDC_ILM_T r_idc_ctrl_ilm_mode; \
546 IDC_GPS_B13_B14_T r_idc_ctrl_gps_b13_b14_mode;
547#endif /* __BUILD_DOM__ */
548
549// Support list of IDC driver
550typedef struct
551{
552 kal_bool idc;
553 kal_bool gpio;
554 kal_bool uart;
555} IDC_SUPPORT_T;
556
557#endif // #ifndef __DCL_IDC_H_STRUCT__
558#endif // #ifdef DCL_DEFINITION_STRUCT
559
560#ifdef DCL_DEFINITION_PROTOTYPE
561#ifndef __DCL_IDC_H_PROTOTYPE__
562#define __DCL_IDC_H_PROTOTYPE__
563
564/*************************************************************************
565* FUNCTION
566* DclIDC_GetSupport
567*
568* DESCRIPTION
569* This function is to get the support list of IDC driver.
570*
571* PARAMETERS
572* support: [IN] IDC_SUPPORT_T *support
573* 1. idc: Indicate whether or not idc driver is supported
574* 2. gpio: Indicate whether or not GPIO Co-Exist will be used after idc_init
575* 3. uart: Indicate whether or not UART will be used after idc_init
576*
577* RETURNS
578* Return the support list
579*
580* RETURN VALUES
581* STATUS_OK
582*
583*************************************************************************/
584extern DCL_STATUS DclIDC_GetSupport(IDC_SUPPORT_T *support);
585
586/*************************************************************************
587* FUNCTION
588* DclIDC_Initialize
589*
590* DESCRIPTION
591* This function is to initialize IDC module
592*
593* RETURNS
594* Return the status of DclIDC_Initialize
595*
596* RETURN VALUES
597* STATUS_OK: Initialize Finished
598*
599*************************************************************************/
600extern DCL_STATUS DclIDC_Initialize(IDC_INIT_TYPE_T type);
601
602
603/*************************************************************************
604* FUNCTION
605* DclIDC_Open
606*
607* DESCRIPTION
608* This function is to open the IDC module and return a handle
609*
610* PARAMETERS
611* dev: [IN] Only valid for DCL_IDC
612* flags: [IN] No sepcial flags is needed. Please use FLAGS_NONE
613*
614* RETURNS
615* Return DCL_HANDLE of IDC
616*
617* RETURN VALUES
618* DCL_HANDLE_INVALID : Open failed
619* Other value : A valid handle
620*
621*************************************************************************/
622extern DCL_HANDLE DclIDC_Open(DCL_DEV dev, DCL_FLAGS flags);
623
624
625/*************************************************************************
626* FUNCTION
627* DclIDC_ReadData
628*
629* DESCRIPTION
630* This function is not supported for the IDC module now.
631*
632* PARAMETERS
633* N/A
634*
635* RETURNS
636* STATUS_UNSUPPORTED
637*
638*************************************************************************/
639extern DCL_STATUS DclIDC_ReadData(DCL_HANDLE handle, DCL_BUFF *buff, DCL_BUFF_LEN *buf_len, DCL_OPTIONS options);
640
641
642/*************************************************************************
643* FUNCTION
644* DclIDC_WriteData
645*
646* DESCRIPTION
647* This function is not supported for the IDC module now.
648*
649* PARAMETERS
650* N/A
651*
652* RETURNS
653* STATUS_UNSUPPORTED
654*
655*************************************************************************/
656extern DCL_STATUS DclIDC_WriteData(DCL_HANDLE handle, DCL_BUFF *buff, DCL_BUFF_LEN *buf_len, DCL_OPTIONS options);
657
658
659/*************************************************************************
660* FUNCTION
661* DclIDC_Configure
662*
663* DESCRIPTION
664* This function is not supported for the IDC module now.
665*
666* PARAMETERS
667* N/A
668*
669* RETURNS
670* STATUS_UNSUPPORTED
671*
672*************************************************************************/
673extern DCL_STATUS DclIDC_Configure(DCL_HANDLE handle, DCL_CONFIGURE_T *configure);
674
675
676/*************************************************************************
677* FUNCTION
678* DclIDC_RegisterCallback
679*
680* DESCRIPTION
681* This function is not supported for the IDC module now.
682*
683* PARAMETERS
684* N/A
685*
686* RETURNS
687* STATUS_UNSUPPORTED
688*
689*************************************************************************/
690extern DCL_STATUS DclIDC_RegisterCallback(DCL_HANDLE handle, DCL_EVENT event, PFN_DCL_CALLBACK callback);
691
692
693/*************************************************************************
694* FUNCTION
695* DclIDC_Control
696*
697* DESCRIPTION
698* This function is to send command to control the IDC module.
699*
700* PARAMETERS
701* handle: [IN] The handle value returned from DclIDC_Open
702* cmd: [IN] A control command for IDC module
703* 1. IDC_CMD_SET_DCB_CONFIG: to config DCB (baudrate, data bits, stop bits, and parity bits)
704* 2. IDC_CMD_GET_DCB_CONFIG: to get DCB config from driver
705* 3. IDC_CMD_SET_BAUDRATE: to set baud rate
706* 4. IDC_CMD_GET_MAX_BAUDRATE: to get max baudrate
707* 5. IDC_CMD_SET_FIFO_TRIGGER: to set threshold of idc rx fifo
708* 6. IDC_CMD_SET_PM_CONFIG: to set pattern matching confg (start/finish priority/pattern, pariority/pattern bit enable)
709* 7. IDC_CMD_GET_PM_CONFIG: to get pattern matching
710* 8. IDC_CMD_SCHEDULE_EVENT: to schedule events
711* 9. IDC_CMD_SCHEDULE_UPDATE: to run schedule
712* 10. IDC_CMD_STOP_EVENT: to stop specific event from specific schedule
713* 11. IDC_CMD_PURGE: to clean IDC RX FIFO
714* 12. IDC_CMD_GET_SCHEDULE_STATUS: to get status of schedule (bitmap, busy:1, idle:0)
715* 13. IDC_CMD_CHECK_EVENT_SEND_OUT: to check all events are sent out from IDC or not
716* 14. IDC_CMD_SET_PIN_CONFIG: to set pinmux beteen internal and external pins (K2 Only)
717* 15. IDC_CMD_GET_PIN_CONFIG: to get pinumx config (K2 Only)
718*
719* data: [IN] The data of the control command
720* 1. IDC_CTRL_DCB_CONFIG_T: pointer to an IDC_CTRL_DCB_CONFIG_T structure
721* 2. IDC_CTRL_BAUDRATE_T: pointer to an IDC_CTRL_BAUDRATE_T structure
722* 3. IDC_CTRL_SET_FIFO_TRIGGER_T: pointer to an IDC_CTRL_SET_FIFO_TRIGGER_T structure
723* 4. IDC_CTRL_PM_CONFIG_T: pointer to an IDC_CTRL_PM_CONFIG_T structure
724* 5. IDC_CTRL_SCHEDULE_EVENT_T: pointer to an IDC_CTRL_SCHEDULE_EVENT_T structure
725* 6. IDC_CTRL_SCHEDULE_UPDATE_T: pointer to an IDC_CTRL_SCHEDULE_UPDATE_T structure
726* 7. IDC_CTRL_STOP_EVENT_T: pointer to an IDC_CTRL_STOP_EVENT_T structure
727* 8. IDC_CTRL_PURGE_T: pointer to an IDC_CTRL_PURGE structure
728* 9. IDC_CTRL_GET_SCHEDULE_STATUS_T: pointer to an IDC_CTRL_GET_SCHEDULE_STATUS_T structure
729* 10. IDC_CTRL_CHECK_EVENT_SEND_OUT_T: pointer to an IDC_CTRL_CHECK_EVENT_SEND_OUT_T structure
730* 11. IDC_CTRL_PIN_CONFIG_T: pointer to an IDC_CTRL_PIN_CONFIG_T structure
731*
732* RETURNS
733* Return the status of DclIDC_Control
734*
735* RETURN VALUES
736* STATUS_OK: Command is executed successfully.
737* STATUS_FAIL: Command is failed.
738* STATUS_INVALID_CMD: It's a invalid command.
739*
740*************************************************************************/
741extern DCL_STATUS DclIDC_Control(DCL_HANDLE handle, DCL_CTRL_CMD cmd, DCL_CTRL_DATA_T *data);
742
743/*************************************************************************
744* FUNCTION
745* DclIDC_conn_txrx_count
746*
747* DESCRIPTION
748* This function is to start/end counting BT_80211_RX and BT_80211_TX
749*
750* PARAMETERS
751* is_start: [IN] KAL_TRUE: Start counting
752* KAL_FALSE: End counting
753*
754* RETURNS
755* Return the status of DclIDC_conn_txrx_count
756*
757* RETURN VALUES
758* STATUS_OK
759*
760*************************************************************************/
761extern DCL_STATUS DclIDC_conn_txrx_count(kal_bool is_start);
762
763/*************************************************************************
764* FUNCTION
765* DclIDC_Close
766*
767* DESCRIPTION
768* This function is to close the IDC module.
769*
770* PARAMETERS
771* handle: [IN] The returned handle value of DclIDC_Open
772*
773* RETURNS
774* Return the status of DclIDC_Close
775*
776* RETURN VALUES
777* STATUS_OK
778*
779*************************************************************************/
780extern DCL_STATUS DclIDC_Close(DCL_HANDLE handle);
781
782// MoDIS parser skip end
783
784#endif // #ifndef __DCL_IDC_H_PROTOTYPE__
785#endif // #ifdef DCL_DEFINITION_PROTOTYPE