blob: 3ec8dfd05e78652f90cb0bb71b1674cdb1d228d7 [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.h
16 *
17 * Project:
18 * --------
19 * Maui
20 *
21 * Description:
22 * ------------
23 * Header file of DCL (Driver Common Layer).
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 * removed!
45 * removed!
46 *
47 * removed!
48 * removed!
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 * removed!
66 * removed!
67 * removed!
68 *
69 * removed!
70 * removed!
71 *
72 * removed!
73 * removed!
74 * removed!
75 *
76 * removed!
77 * removed!
78 * removed!
79 *
80 * removed!
81 * removed!
82 * removed!
83 *
84 * removed!
85 * removed!
86 * removed!
87 *
88 * removed!
89 * removed!
90 * removed!
91 *
92 * removed!
93 * removed!
94 * removed!
95 *
96 * removed!
97 * removed!
98 * removed!
99 *
100 * removed!
101 * removed!
102 * removed!
103 *
104 * removed!
105 * removed!
106 * removed!
107 *
108 * removed!
109 * removed!
110 * removed!
111 * removed!
112 * removed!
113 * removed!
114 * removed!
115 * removed!
116 * removed!
117 * removed!
118 * removed!
119 * removed!
120 * removed!
121 * removed!
122 * removed!
123 *
124 * removed!
125 * removed!
126 * removed!
127 *
128 * removed!
129 * removed!
130 * removed!
131 *
132 * removed!
133 * removed!
134 * removed!
135 *
136 * removed!
137 * removed!
138 * removed!
139 *
140 * removed!
141 * removed!
142 * removed!
143 *
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 *
160 * removed!
161 * removed!
162 * removed!
163 *
164 * removed!
165 * removed!
166 * removed!
167 *
168 * removed!
169 * removed!
170 * removed!
171 *
172 * removed!
173 * removed!
174 * removed!
175 *
176 * removed!
177 * removed!
178 * removed!
179 *
180 * removed!
181 * removed!
182 * removed!
183 *
184 * removed!
185 * removed!
186 * removed!
187 *
188 * removed!
189 * removed!
190 * removed!
191 *
192 * removed!
193 * removed!
194 * removed!
195 *
196 * removed!
197 * removed!
198 * removed!
199 *
200 * removed!
201 * removed!
202 * removed!
203 *
204 * removed!
205 * removed!
206 * removed!
207 *
208 * removed!
209 * removed!
210 * removed!
211 *
212 * removed!
213 * removed!
214 * removed!
215 *
216 * removed!
217 * removed!
218 * removed!
219 *
220 * removed!
221 * removed!
222 * removed!
223 *
224 * removed!
225 * removed!
226 * removed!
227 *
228 * removed!
229 * removed!
230 * removed!
231 *
232 * removed!
233 * removed!
234 * removed!
235 *
236 * removed!
237 * removed!
238 * removed!
239 *
240 * removed!
241 * removed!
242 * removed!
243 *
244 * removed!
245 * removed!
246 * removed!
247 *
248 * removed!
249 * removed!
250 * removed!
251 *
252 * removed!
253 * removed!
254 * removed!
255 *
256 * removed!
257 * removed!
258 * removed!
259 *
260 * removed!
261 * removed!
262 * removed!
263 *
264 *------------------------------------------------------------------------------
265 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
266 *============================================================================
267 ****************************************************************************/
268
269#ifndef __DCL_H__
270#define __DCL_H__
271
272
273#if !defined(GEN_FOR_PC) && !defined(NVRAM_AUTO_GEN)
274#ifdef __CATEGORY_MODEM__
275//#error drv_features.h include by modem detection
276#endif
277#endif //!defined(GEN_FOR_PC) && !defined(NVRAM_AUTO_GEN)
278
279
280
281
282/* For solve build error after defined __CATEGORY_MODEM__ */
283/*
284#ifdef __CATEGORY_MODEM__ // doesn't need to include these module
285//#define NONE_MODEM_BMT
286//#define NONE_MODEM_RTC
287#define NONE_MODEM_I2C
288#define NONE_MODEM_AUX
289//#define NONE_MODEM_KBDH
290//#define NONE_MODEM_KBD
291#define NONE_MODEM_PWM
292#define NONE_MODEM_ALERTER
293#define NONE_MODEM_TS
294#define NONE_MODEM_SD
295#define NONE_MODEM_USBD
296#define NONE_MODEM_OTG
297#define NONE_MODEM_IRDA
298//#define NONE_MODEM_PW
299#define NONE_MODEM_PXS
300#endif
301*/
302
303//#define NONE_MODEM_IDC
304
305//ZTE73
306//#ifdef __MODEM_COMPONENT__ // doesn't need to include these module in modem ip
307//#define NONE_MODEM_BMT // l4misc
308//#define NONE_MODEM_RTC // l4misc
309//#define NONE_MODEM_KBDH // l4_classb
310//#define NONE_MODEM_KBD // l4_classb
311//#define NONE_MODEM_PW // l4_classb
312//#endif
313
314//NAMI76
315//#ifdef __MODEM_PRODUCT__ // doesn't need to include these module in modem product
316//#define NONE_MODEM_BMT // l4misc
317//#define NONE_MODEM_RTC // l4misc
318//#define NONE_MODEM_KBDH // l4misc l4_calssb
319//#define NONE_MODEM_KBD // l4misc l4_classb
320//#define NONE_MODEM_PW // l4misc peripheral l4_classb
321//#endif
322
323
324
325typedef char DCL_CHAR;
326typedef signed char DCL_INT8;
327typedef signed short DCL_INT16;
328typedef signed long DCL_INT32;
329
330typedef unsigned char DCL_UCHAR;
331typedef unsigned char DCL_UINT8;
332typedef unsigned short DCL_UINT16;
333typedef unsigned long DCL_UINT32;
334
335#if !defined(GEN_FOR_PC) && defined(_MSC_VER)
336 typedef signed __int64 DCL_INT64;
337typedef unsigned __int64 DCL_UINT64;
338#else
339 typedef unsigned long long DCL_UINT64;
340 typedef signed long long DCL_INT64;
341#endif
342
343typedef double DCL_DOUBLE;
344typedef int DCL_INT;
345
346//typedef int DCL_BOOL;
347typedef enum
348{
349 DCL_FALSE = 0,
350 DCL_TRUE
351}DCL_BOOLEAN;
352
353#define DCL_BOOL DCL_BOOLEAN
354
355#define DCL_DEFINITION_STRUCT
356
357#ifndef NONE_MODEM_GPT
358#include "dcl_gpt.h"
359#endif
360#ifndef NONE_MODEM_GPIO
361#include "dcl_gpio.h"
362#endif
363#ifndef NONE_MODEM_UART
364#include "dcl_uart.h"
365#endif
366#ifndef NONE_MODEM_WDT
367#include "dcl_wdt.h"
368#endif
369#ifndef NONE_MODEM_ADC
370#include "dcl_adc.h"
371#endif
372#ifndef NONE_MODEM_BMT
373#include "dcl_bmt.h"
374#endif
375#ifndef NONE_MODEM_PFC
376#include "dcl_pfc.h"
377#endif
378#ifndef NONE_MODEM_RTC
379#include "dcl_rtc.h"
380#endif
381#ifndef NONE_MODEM_I2C
382#include "dcl_i2c.h"
383#endif
384#ifndef NONE_MODEM_AUX
385#include "dcl_aux.h"
386#endif
387#if !defined(NONE_MODEM_PWM) && !defined(NONE_MODEM_ALERTER)
388#include "dcl_pwm.h"
389#endif
390#ifndef NONE_MODEM_KBDH
391#include "DclH_kbd.h"
392#endif
393#ifndef NONE_MODEM_KBD
394#include "DclS_kbd.h"
395#endif
396#ifndef NONE_MODEM_STS
397#include "dcl_sts.h"
398#endif
399#ifndef NONE_MODEM_MSDC
400#include "dcl_msdc.h"
401#endif
402#ifndef NONE_MODEM_USB
403#include "dcl_usb_drv.h"
404#endif
405#ifndef NONE_MODEM_USBD
406#include "dcl_usb_hcd.h"
407#endif
408#ifndef NONE_MODEM_OTG
409#include "dcl_otg_drv.h"
410#endif
411#ifndef NONE_MODEM_IRDA
412#include "dcl_irda.h"
413#endif
414#ifndef NONE_MODEM_SIM
415#include "dcl_sim.h"
416#endif
417#ifndef NONE_MODEM_PMU
418#include "dcl_pmu.h"
419#endif
420#ifndef NONE_MODEM_PW
421#include "dcl_pw.h"
422#endif
423#ifndef NONE_MODEM_CHR_USB_DET
424#include "dcl_chr_det.h"
425#endif
426#ifndef NONE_MODEM_SPMI
427#include "dcl_spmi.h"
428#endif
429#ifndef NONE_MODEM_PXS
430#include "dcl_pxs.h"
431#endif
432#ifndef NONE_MODEM_SIM_GPIO
433#include "dcl_sim_gpio.h"
434#endif
435#ifndef NONE_MODEM_F32K_CLK
436#include "dcl_f32k_clk.h"
437#endif
438#ifndef NONE_MODEM_IDC
439#include "dcl_idc.h"
440#endif
441#ifndef NONE_MTAD
442#include "dcl_mtad.h"
443#endif
444
445
446/*******************************************************************************
447 * DCL_STATUS
448 *******************************************************************************/
449#if defined(STATUS_OK)
450#undef STATUS_OK
451#endif
452
453#if defined(STATUS_FAIL)
454#undef STATUS_FAIL
455#endif
456
457typedef DCL_INT32 DCL_STATUS;
458typedef enum
459{
460 STATUS_OK = 0,
461 STATUS_FAIL = -1,
462 STATUS_INVALID_CMD = -2,
463 STATUS_UNSUPPORTED = -3,
464 STATUS_NOT_OPENED = -4,
465 STATUS_INVALID_EVENT = -5,
466 STATUS_INVALID_DCL_HANDLE = -6,
467 STATUS_INVALID_CTRL_DATA = -7,
468 STATUS_INVALID_CONFIGURATION = -8,
469 STATUS_INVALID_ARGUMENT = -9,
470 STATUS_ERROR_TIMEOUT = -10,
471 STATUS_ERROR_CRCERROR = -11,
472 STATUS_ERROR_READONLY = -12,
473 STATUS_ERROR_WRONG_STATE = -13,
474 STATUS_INVALID_DEVICE = -14,
475 STATUS_ALREADY_OPENED = -15,
476 STATUS_SET_VFIFO_FAIL = -16,
477 STATUS_INVALID_OPERATION = -17,
478 STATUS_DEVICE_NOT_EXIST = -18,
479
480 //*/ I2C DCL added /*//
481 STATUS_DEVICE_NOT_SUPPORT_DMA = -19,
482 STATUS_DEVICE_IS_BUSY = -20,
483 STATUS_ACKERR = -21,
484 STATUS_HS_NACKERR = -22,
485
486 STATUS_BUFFER_EMPTY = 1
487} DCL_STATUS_T;
488
489/*******************************************************************************
490 * DCL_DEV
491 *******************************************************************************/
492typedef DCL_UINT16 DCL_DEV;
493typedef enum
494{
495#ifndef NONE_MODEM_UART
496 DCL_UART_GROUP_START = 0,
497 DCL_UART_DEV // Marco defined in dcl_uart.h
498#endif
499#ifndef NONE_MODEM_GPIO
500 DCL_GPIO_GROUP_START = 0x100,
501 DCL_GPIO,
502 DCL_GPO,
503 DCL_GPIO_CLK,
504#endif
505#ifndef NONE_MODEM_GPT
506 DCL_GPT_GROUP_START = 0x200,
507 DCL_GPT_CB,
508 DCL_GPT_CB2,
509 DCL_GPT_BusyWait,
510 DCL_GPT_FreeRUN3,
511 DCL_GPT_FreeRUN4,
512 DCL_GPT_DEBUG,
513 DCL_XGPT,
514 DCL_GPT_CB_MS, /* dongming add for 1ms GPT */
515 DCL_LITEGPT_CB_ETMR, /* way add for ETMR */
516 DCL_GPT_CB_LOGGING, /* way add for LOGGING 1ms GPT */
517 DCL_GPT_C2K_OS, /* way add for C2K 1us OneShot timer */
518 DCL_GPT_C2K_AR, /* way add for C2K 1us Auto Repeat timer */
519 DCL_GPT_DSP, /* way add for DSP 1us OneShot timer */
520 DCL_GPT_DSCC_0, /* Alva add for DSCC 1us OneShot timer */
521 DCL_GPT_DSCC_1, /* Alva add for DSCC 1us OneShot timer */
522 DCL_GPT_DPCOPRO,
523#endif
524#ifndef NONE_MODEM_PWM
525 DCL_PWM_GROUP_START = 0x300,
526 DCL_PWM1,
527 DCL_PWM2,
528 DCL_PWM3,
529 DCL_PWM4,
530 DCL_PWM5,
531 DCL_PWM6,
532#endif
533 DCL_PWM_GROUP_END = 0x400,
534 DCL_REST_GROUP_START = DCL_PWM_GROUP_END,
535#ifndef NONE_MODEM_BMT
536 DCL_BMT_GROUP_START = 0x500,
537 DCL_BMT,
538#endif
539#ifndef NONE_MODEM_PFC
540 DCL_PFC_GROUP_START = 0x600,
541 DCL_PFC,
542#endif
543#ifndef NONE_MODEM_RTC
544 DCL_RTC_GROUP_START = 0x700,
545 DCL_RTC,
546#endif
547#ifndef NONE_MODEM_ADC
548 DCL_ADC_GROUP_START = 0x800,
549 DCL_ADC,
550#endif
551#ifndef NONE_MODEM_PMU
552 DCL_PMU_GROUP_START = 0x900,
553 DCL_PMU,
554#endif
555#ifndef NONE_MODEM_PW
556 DCL_PW_GROUP_START = 0xA00,
557 DCL_PW,
558#endif
559#ifndef NONE_MODEM_CHR_USB_DET
560 DCL_CHR_USB_DET_GROUP_START = 0xB00,
561 DCL_CHR_USB_DET,
562#endif
563#ifndef NONE_MODEM_ALERTER
564 DCL_ALERTER_GROUP_START = 0xC00,
565 DCL_ALERTER,
566#endif
567#ifndef NONE_MODEM_KBD
568 DCL_KBD_GROUP_START = 0xD00,
569 DCL_KBD,
570#endif
571#ifndef NONE_MODEM_TS
572 DCL_TS_GROUP_START = 0xE00,
573 DCL_TS,
574#endif
575#ifndef NONE_MODEM_I2C
576 DCL_I2C_GROUP_START = 0xF00,
577 DCL_I2C,
578#endif
579/* Moly have no ACCDET*/
580#if 0
581#ifndef NONE_MODEM_AUX
582/* under construction !*/
583/* under construction !*/
584#endif
585#endif
586#ifndef NONE_MODEM_WDT
587 DCL_WDT_GROUP_START = 0x1100,
588 DCL_WDT,
589#endif
590#ifndef NONE_MODEM_IRDA
591 DCL_IRDA_GROUP_START = 0x1200,
592 DCL_IRDA,
593#endif
594#ifndef NONE_MODEM_USB
595 DCL_USB_GROUP_START = 0x1300,
596 DCL_USB,
597#endif
598#ifndef NONE_MODEM_SIM
599 DCL_SIM_GROUP_START = 0x1400,
600 DCL_SIM,
601#endif
602#ifndef NONE_MODEM_SD
603 DCL_SD_GROUP_START = 0x1500,
604 DCL_SD,
605#endif
606#ifndef NONE_MODEM_MS
607 DCL_MS_GROUP_START = 0x1600,
608 DCL_MS,
609#endif
610#ifndef NONE_MODEM_SDIO
611 DCL_SDIO_GROUP_START = 0x1700,
612 DCL_SDIO,
613#endif
614#ifndef NONE_MODEM_ONEW
615 DCL_ONEW_GROUP_START = 0x1800,
616 DCL_ONEW, //1-wire
617#endif
618#ifndef NONE_MODEM_HDQ
619 DCL_HDQ_GROUP_START = 0x1900,
620 DCL_HDQ,
621#endif
622#ifndef NONE_MODEM_PXS
623 DCL_PXS_GROUP_START = 0x1A00,
624 DCL_PXS,
625#endif
626#ifndef NONE_MODEM_SIM_GPIO
627 DCL_SIM_GPIO_GROUP_START = 0x1B00,
628 DCL_SIM_GPIO,
629#endif
630#ifndef NONE_MODEM_SIM_GPI
631 DCL_SIM_GPI_GROUP_START = 0x1C00,
632 DCL_SIM_GPI,
633#endif
634#ifndef NONE_MODEM_F32K_CLK
635 DCL_F32K_CLK_GROUP_START = 0x1D00,
636 DCL_F32K_CLK,
637#endif
638#ifndef NONE_MODEM_IDC
639 DCL_IDC_GROUP_START = 0x1E00,
640 DCL_IDC,
641#endif
642#ifndef NONE_MTAD
643 DCL_MTAD_GROUP_START = 0x1F00,
644 DCL_MTAD,
645#endif
646#ifndef NONE_MODEM_SPMI
647 DCL_SPMI_GROUP_START = 0x2000,
648 DCL_SPMI
649#endif
650
651} DCL_DEV_T;
652
653/*******************************************************************************
654 * DCL_FLAGS
655 *******************************************************************************/
656typedef DCL_UINT32 DCL_FLAGS;
657typedef enum
658{
659 FLAGS_NONE = 0,
660#ifndef NONE_MODEM_PMU
661 /* Below is the command for PMU */
662 PMU_FLAGS_START = 0x100,
663 PMU_FLAGS //Please see dcl_pmu.h
664#endif
665 FLAGS_END
666} DCL_FLAGS_T;
667
668
669/*******************************************************************************
670 * DCL_OPTIONS
671 *******************************************************************************/
672typedef DCL_UINT32 DCL_OPTIONS;
673typedef enum
674{
675 OPTIONS_NONE = 0,
676#ifndef NONE_MODEM_GPT
677 GPT_OPTIONS_START = OPTIONS_NONE,
678 GPT_OPTIONS //Please see dcl_gpt.h
679#endif
680#ifndef NONE_MODEM_GPIO
681 GPIO_OPTIONS_START = 0x100,
682 GPIO_OPTIONS //Please see dcl_gpio.h
683#endif
684#ifndef NONE_MODEM_ADC
685 ADC_OPTIONS_START = 0x200,
686 ADC_OPTIONS //Please see dcl_adc.h
687#endif
688#ifndef NONE_MODEM_WDT
689 WDT_OPTIONS_START = 0x300,
690 WDT_OPTIONS //Please see dcl_wdt.h
691#endif
692#ifndef NONE_MODEM_BMT
693 BMT_OPTIONS_START = 0x400,
694 BMT_OPTIONS // Please see dcl_bmt.h
695#endif
696#ifndef NONE_MODEM_PFC
697 PFC_OPTIONS_START = 0x500,
698 PFC_OPTIONS // Please see dcl_pfc.h
699#endif
700#ifndef NONE_MODEM_RTC
701 RTC_OPTIONS_START = 0x600,
702 RTC_OPTIONS // Please see dcl_rtc.h
703#endif
704#ifndef NONE_MODEM_I2C
705 I2C_OPTIONS_START = 0x700,
706 I2C_OPTIONS //Please see dcl_i2c.h
707#endif
708#if 0
709#ifndef NONE_MODEM_AUX
710/* under construction !*/
711/* under construction !*/
712#endif
713#endif
714#ifndef NONE_MODEM_TS
715 TS_OPTIONS_START = 0x900,
716 TS_OPTIONS//Please see dcl_ts.h
717#endif
718#ifndef NONE_MODEM_USB
719 USB_DRV_OPTIONS_START = 0xA00,
720 USB_DRV_OPTIONS//Please see dcl_usb_drv.h
721#endif
722#ifndef NONE_MODEM_USBD
723 USB_HCD_OPTIONS_START = 0xB00,
724 USB_HCD_OPTIONS//Please see dcl_usb_hcd.h
725#endif
726#ifndef NONE_MODEM_OTG
727 OTG_DRV_OPTIONS_START = 0xC00,
728 OTG_DRV_OPTIONS//Please see dcl_otg_drv.h
729#endif
730#ifndef NONE_MODEM_IRDA
731 IRDA_OPTIONS_START = 0xD00,
732 IRDA_OPTIONS//Please see dcl_irda.h
733#endif
734#ifndef NONE_MODEM_PMU
735 PMU_OPTIONS_START = 0xE00,
736 PMU_OPTIONS // Please see dcl_pmu.h
737#endif
738#ifndef NONE_MODEM_PW
739 PW_OPTIONS_START = 0xF00,
740 PW_OPTIONS // Please see dcl_pw.h
741#endif
742#ifndef NONE_MODEM_CHR_USB_DET
743 CHR_DET_OPTIONS_START = 0x1000,
744 CHR_DET_OPTIONS // Please see dcl_chr_usb_det.h
745#endif
746#ifndef NONE_MODEM_SPMI
747 SPMI_OPTIONS_START = 0x1100,
748 SPMI_OPTIONS // Please see dcl_spmi.h
749#endif
750#ifndef NONE_MODEM_PXS
751 PXS_OPTIONS_START = 0x2000,
752 PXS_OPTIONS // Please see dcl_pxs.h
753#endif
754#ifndef NONE_MODEM_F32K_CLK
755 F32K_CLK_OPTIONS_START = 0x4000,
756 F32K_CLK_OPTIONS // Please see dcl_f32k_clk.h
757#endif
758#ifndef NONE_MODEM_IDC
759 IDC_OPTIONS_START = 0x5000,
760 IDC_OPTIONS // Please see dcl_idc.h
761#endif
762 OPTIONS_MAX
763} DCL_OPTIONS_T;
764
765/*******************************************************************************
766 * DCL_HANDLE
767 *******************************************************************************/
768typedef DCL_INT32 DCL_HANDLE;
769#define DCL_HANDLE_NONE (0)
770#define DCL_HANDLE_INVALID (-1)
771#define DCL_HANDLE_OCCUPIED (-2)
772
773/*******************************************************************************
774 * DCL_BUFF
775 *******************************************************************************/
776typedef DCL_UINT8 DCL_BUFF;
777typedef DCL_UINT32 DCL_BUFF_LEN;
778
779/*******************************************************************************
780 * DCL_CONFIGURE_T
781 *******************************************************************************/
782typedef union
783{
784#ifndef NONE_MODEM_PWM
785 PWM_CONFIGS//Please see dcl_PWM.h
786#endif
787#ifndef NONE_MODEM_ADC
788 // For ADC, please see dcl_adc.h
789 ADC_CONFIGS
790#endif
791#ifndef NONE_MODEM_BMT
792 // For BMT, please see dcl_bmt.h
793 BMT_CONFIGS
794#endif
795#ifndef NONE_MODEM_PFC
796 // For PFC, please see dcl_pfc.h
797 PFC_CONFIGS
798#endif
799#ifndef NONE_MODEM_RTC
800 // For RTC, please see dcl_rtc.h
801 RTC_CONFIGS
802#endif
803#ifndef NONE_MODEM_WDT
804 // For WDT, please see dcl_wdt.h
805 WDT_CONFIGS
806#endif
807#ifndef NONE_MODEM_I2C
808 // For I2C, please see dcl_i2c.h
809 I2C_CONFIGS
810#endif
811#if 0
812#ifndef NONE_MODEM_AUX
813/* under construction !*/
814/* under construction !*/
815#endif
816#endif
817#ifndef NONE_MODEM_USB
818 // For USB_DRV, please see dcl_usb_drv.h
819 USB_DRV_CONFIGS
820#endif
821#ifndef NONE_MODEM_USBD
822 // For USB_HCD, please see dcl_usb_hcd.h
823 USB_HCD_CONFIGS
824#endif
825#ifndef NONE_MODEM_OTG
826 // For OTG_DRV, please see dcl_otg_drv.h
827 OTG_DRV_CONFIGS
828#endif
829#ifndef NONE_MODEM_IRDA
830 // For IRDA, please see dcl_irda.h
831 IRDA_CONFIGS
832#endif
833#ifndef NONE_MODEM_PMU
834 // For PMU, please see dcl_pmu.h
835 PMU_CONFIGS
836#endif
837#ifndef NONE_MODEM_PW
838 // For PW, please see dcl_pw.h
839 PW_CONFIGS
840#endif
841#ifndef NONE_MODEM_CHR_USB_DET
842 // For CHR&USB detection , please see dcl_chr_usb_det.h
843 CHR_DET_CONFIGS
844#endif
845#ifndef NONE_MODEM_SPMI
846 // For SPMI, please see dcl_spmi.h
847 SPMI_CONFIGS
848#endif
849#ifndef NONE_MODEM_SIM
850 // For SIM, please see dcl_sim.h
851 SIM_CONFIGS
852#endif
853#ifndef NONE_MODEM_TS
854 //for TS, please see dcl_ts.h
855 TS_CONFIGS
856#endif
857#ifndef NONE_MODEM_PXS
858 // For PXS, please see dcl_pxs.h
859 PXS_CONFIGS
860#endif
861#ifndef NONE_MODEM_F32K_CLK
862 // For F32K_CLK, please see dcl_f32k_clk.h
863 F32K_CLK_CONFIGS
864#endif
865#ifndef NONE_MODEM_IDC
866 // For IDC, please see dcl_idc.h
867 IDC_CONFIGS
868#endif
869} DCL_CONFIGURE_T;
870
871
872/*******************************************************************************
873 * DCL_EVENT
874 *******************************************************************************/
875typedef DCL_UINT32 DCL_EVENT;
876typedef enum
877{
878 EVENT_NULL = 0,
879#ifndef NONE_MODEM_GPT
880 // For HGPT, please see dcl_gpt.h
881 GPT_EVENTS_START = EVENT_NULL,
882 GPT_EVENTS
883#endif
884#ifndef NONE_MODEM_GPIO
885 //for GPIO, please see dcl_gpio.h
886 GPIO_EVENTS_START = 0x100,
887 GPIO_EVENTS
888#endif
889#ifndef NONE_MODEM_BMT
890 // For BMT, please see dcl_bmt.h
891 BMT_EVENTS_START = 0x200,
892 BMT_EVENTS
893#endif
894#ifndef NONE_MODEM_PFC
895 // For PFC, please see dcl_pfc.h
896 PFC_EVENTS_START = 0x300,
897 PFC_EVENTS
898#endif
899#ifndef NONE_MODEM_RTC
900 // For RTC, please see dcl_rtc.h
901 RTC_EVENTS_START = 0x400,
902 RTC_EVENTS
903#endif
904#ifndef NONE_MODEM_WDT
905 // For WDT, please see dcl_wdt.h
906 WDT_EVENTS_START = 0x500,
907 WDT_EVENTS
908#endif
909#ifndef NONE_MODEM_ADC
910 // For ADC, please see dcl_adc.h
911 ADC_EVENTS_START = 0x600,
912 ADC_EVENTS
913#endif
914#ifndef NONE_MODEM_I2C
915 // For I2C, please see dcl_i2c.h
916 I2C_EVENTS_START = 0x700,
917 I2C_EVENTS
918#endif
919#if 0
920#ifndef NONE_MODEM_AUX
921/* under construction !*/
922/* under construction !*/
923/* under construction !*/
924#endif
925#endif
926#ifndef NONE_MODEM_KBDH
927 //For Keypad, Please see dcl_kbd.h
928 KBDH_EVENTS_START = 0x900,
929 KBDH_EVENTS
930#endif
931#ifndef NONE_MODEM_TS
932 //For TS, Please see dcl_ts.h
933 TS_EVENTS_START = 0xA00,
934 TS_EVENTS
935#endif
936#ifndef NONE_MODEM_USB
937 //For USB_DRV, please see dcl_usb_drv.h
938 USB_DRV_EVENTS_START = 0xB00,
939 USB_DRV_EVENTS
940#endif
941#ifndef NONE_MODEM_USBD
942 //For USB_HCD, please see dcl_usb_hcd.h
943 USB_HCD_EVENTS_START = 0xC00,
944 USB_HCD_EVENTS
945#endif
946#ifndef NONE_MODEM_OTG
947 //For OTG_DRV, please see dcl_otg_drv.h
948 OTG_DRV_EVENTS_START = 0xD00,
949 OTG_DRV_EVENTS
950#endif
951#ifndef NONE_MODEM_IRDA
952 // For IrDA, please see dcl_irda.h
953 IRDA_EVENTS_START = 0xE00,
954 IRDA_EVENTS
955#endif
956#ifndef NONE_MODEM_PMU
957 // For pmu, please see dcl_pmu.h
958 PMU_EVENTS_START = 0xF00,
959 PMU_EVENTS
960#endif
961#ifndef NONE_MODEM_PW
962 // For pw, please see dcl_pw.h
963 PW_EVENTS_START = 0x1000,
964 PW_EVENTS
965#endif
966#ifndef NONE_MODEM_CHR_USB_DET
967 // For Chr&USB detection , please see dcl_chr_usb_det.h
968 CHR_DET_EVENTS_START = 0x1100,
969 CHR_DET_EVENTS
970#endif
971#ifndef NONE_MODEM_PXS
972 // For PXS, please see dcl_pxs.h
973 PXS_EVENTS_START = 0x1200,
974 PXS_EVENTS
975#endif
976#ifndef NONE_MODEM_F32K_CLK
977 // For F32K_CLK, please see dcl_f32k_clk.h
978 F32K_CLK_EVENTS_START = 0x1300,
979 F32K_CLK_EVENTS
980#endif
981#ifndef NONE_MODEM_IDC
982 // For IDC, please see dcl_idc.h
983 IDC_EVENTS_START = 0x1400,
984 IDC_EVENTS
985#endif
986#ifndef NONE_MODEM_SPMI
987 // For spmi, please see dcl_spmi.h
988 SPMI_EVENTS_START = 0x1500,
989 SPMI_EVENTS
990#endif
991 EVENT_END
992} DCL_EVENT_T;
993
994/*******************************************************************************
995 * PFN_DCL_CALLBACK
996 *******************************************************************************/
997typedef void (*PFN_DCL_CALLBACK)(DCL_EVENT event);
998
999/*******************************************************************************
1000 * DCL_CTRL_CMD
1001 *******************************************************************************/
1002#if defined(CMD_END)
1003#undef CMD_END
1004#endif
1005typedef DCL_UINT32 DCL_CTRL_CMD;
1006typedef enum
1007{
1008 CMDS_START = 0,
1009 /* Below is the command for GPIO */
1010#ifndef NONE_MODEM_GPIO
1011 //please make sure GPIO Command start from zero! [drv_tool genertate a char type variable]
1012 GPIO_CMDS_START = CMDS_START,
1013 GPIO_CMDS //please see dcl_gpio.h
1014#endif
1015#ifndef NONE_MODEM_UART
1016 /* Below is the command for UART */
1017 UART_CMDS_START = 0x100,
1018 UART_CMDS //please see dcl_uart.h
1019#endif
1020#ifndef NONE_MODEM_GPT
1021 /* Below is the command for GPT */
1022 GPT_CMDS_START = 0x200,
1023 GPT_CMDS //please see dcl_gpt.h
1024#endif
1025#ifndef NONE_MODEM_ADC
1026 /* Below is the command for ADC */
1027 /* Exported adc schedule APIs */
1028 ADC_CMDS_START = 0x300,
1029 ADC_CMDS
1030 /* Interfac for Hardware ADC */
1031 HADC_CMDS_START = 0x400,
1032 HADC_CMDS
1033#endif
1034#ifndef NONE_MODEM_WDT
1035 /* Below is the command for WDT */
1036 WDT_CMDS_START = 0x500,
1037 WDT_CMDS
1038#endif
1039#ifndef NONE_MODEM_BMT
1040 /* Below is the command for BMT */
1041 BMT_CMDS_START = 0x600,
1042 BMT_CMDS // Please see dcl_bmt.h
1043#endif
1044#ifndef NONE_MODEM_PFC
1045 /* Below is the command for PFC */
1046 PFC_CMDS_START = 0x700,
1047 PFC_CMDS // Please see dcl_pfc.h
1048#endif
1049#ifndef NONE_MODEM_RTC
1050 /* Below is the command for RTC */
1051 RTC_CMDS_START = 0x800,
1052 RTC_CMDS // Please see dcl_rtc.h
1053#endif
1054#ifndef NONE_MODEM_I2C
1055 /* Below is the command for I2C */
1056 I2C_CMDS_START = 0x900,
1057 I2C_CMDS
1058#endif
1059#if 0
1060#ifndef NONE_MODEM_AUX
1061/* under construction !*/
1062/* under construction !*/
1063/* under construction !*/
1064#endif
1065#endif
1066#ifndef NONE_MODEM_KBDH
1067 /* Below is the command for KBD */
1068 KBDH_CMDS_START = 0xB00,
1069 KBDH_CMDS
1070#endif
1071#ifndef NONE_MODEM_KBD
1072 KBD_CMDS_START = 0xC00,
1073 KBD_CMDS//Please see dcl_kbd.h
1074#endif
1075#ifndef NONE_MODEM_PWM
1076 /* Below is the command for OWM */
1077 PWM_CMDS_START = 0xD00,
1078 PWM_CMDS//Please see dcl_PWM.h
1079#endif
1080#ifndef NONE_MODEM_ALERTER
1081 ALERTER_CMDS_START = 0xE00,
1082 ALERTER_CMDS //please see dcl_pwm.h
1083#endif
1084#ifndef NONE_MODEM_TS
1085 /* Below is the command for TS */
1086 TS_CMDS_START = 0xF00,
1087 TS_CMDS//Please see dcl_ts.h
1088#endif
1089#ifndef NONE_MODEM_SD
1090 /* Below is the command for SD*/
1091 SD_CMDS_START = 0x1000,
1092 SD_CMDS//Please see dcl_msdc.h
1093#endif
1094#ifndef NONE_MODEM_SDIO
1095 /* Below is the command for SDIO*/
1096 SDIO_CMDS_START = 0x1100,
1097 SDIO_CMDS//Please see dcl_msdc.h
1098#endif
1099#ifndef NONE_MODEM_USB
1100 /* Below is the commands for USB_DRV, please see dcl_usb_drv.h */
1101 USB_DRV_CMDS_START = 0x1300,
1102 USB_DRV_CMDS
1103#endif
1104#ifndef NONE_MODEM_USBD
1105 /* Below is the commands for USB_HCD, please see dcl_usb_hcd.h */
1106 USB_HCD_CMDS_START = 0x1400,
1107 USB_HCD_CMDS
1108#endif
1109#ifndef NONE_MODEM_OTG
1110 /* Below is the commands for OTG_DRV, please see dcl_otg_drv.h */
1111 OTG_DRV_CMDS_START = 0x1500,
1112 OTG_DRV_CMDS
1113#endif
1114#ifndef NONE_MODEM_IRDA
1115 /* Below is the command for IRDA*/
1116 IRDA_CMDS_START = 0x1600,
1117 IRDA_CMDS//Please see dcl_irda.h
1118#endif
1119#ifndef NONE_MODEM_SIM
1120 /* Below is the command for SIM*/
1121 SIM_CMDS_START = 0x1700,
1122 SIM_CMDS//Please see dcl_msdc.h
1123#endif
1124#ifndef NONE_MODEM_PMU
1125 /* Below is the command for PMU */
1126 PMU_CMDS_START = 0x1800,
1127 PMU_CMDS //Please see dcl_pmu.h
1128#endif
1129#ifndef NONE_MODEM_PW
1130 /* Below is the command for PW */
1131 PW_CMDS_START = 0x1900,
1132 PW_CMDS //Please see dcl_pw.h
1133#endif
1134#ifndef NONE_MODEM_CHR_USB_DET
1135 /* Below is the command for CHR USB DETECT */
1136 CHR_DET_CMDS_START = 0x1A00,
1137 CHR_DET_CMDS //Please see dcl_chr_usb_det.h
1138#endif
1139#ifndef NONE_MODEM_PXS
1140 /* Below is the command for PXS */
1141 PXS_CMDS_START = 0x1B00,
1142 PXS_CMDS //Please see dcl_pxs.h
1143#endif
1144#ifndef NONE_MODEM_SIM_GPIO
1145 /* Below is the command for SIM GPIO */
1146 SIMGPIO_CMDS_START = 0x1C00,
1147 SIMGPIO_CMDS //Please see dcl_sim_gpio.h
1148#endif
1149#ifndef NONE_MODEM_F32K_CLK
1150 /* Below is the command for F32K_CLK */
1151 F32K_CLK_CMDS_START = 0x1D00,
1152 F32K_CLK_CMDS //please see dcl_f32k_clk.h
1153#endif
1154#ifndef NONE_MODEM_IDC
1155 /* Below is the command for IDC */
1156 IDC_CMDS_START = 0x1E00,
1157 IDC_CMDS // Please see dcl_idc.h
1158#endif
1159#ifndef NONE_MODEM_SPMI
1160 /* Below is the command for SPMI */
1161 SPMI_CMDS_START = 0x1F00,
1162 SPMI_CMDS //Please see dcl_spmi.h
1163#endif
1164 CMD_END
1165} DCL_CTRL_CMD_T;
1166
1167/*******************************************************************************
1168 * DCL_CTRL_DATA_T: Define the Control data structure for each module's command
1169 *******************************************************************************/
1170typedef union
1171{
1172#ifndef NONE_MODEM_GPT
1173 /* GPT control datas, please see dcl_gpt.h */
1174 GPT_CTRLS
1175#endif
1176#ifndef NONE_MODEM_UART
1177 /* UART control datas, please see dcl_uart.h */
1178 UART_CTRLS
1179#endif
1180#ifndef NONE_MODEM_GPIO
1181 /* GPIO control datas, please see dcl_gpio.h */
1182 GPIO_CTRLS
1183#endif
1184#ifndef NONE_MODEM_ADC
1185 /* ADC control datas, please see dcl_adc.h */
1186 ADC_CTRLS
1187#endif
1188#ifndef NONE_MODEM_WDT
1189 /* WDT control datas, please see dcl_wdt.h */
1190 WDT_CTRLS
1191#endif
1192#ifndef NONE_MODEM_BMT
1193 /* Below is the ctrl structures for BMT */
1194 BMT_CTRLS //Please see dcl_bmt.h
1195#endif
1196#ifndef NONE_MODEM_PFC
1197 /* Below is the ctrl structures for PFC */
1198 PFC_CTRLS // Please see dcl_pfc.h
1199#endif
1200#ifndef NONE_MODEM_RTC
1201 /* RTC control datas, please see dcl_rtc.h */
1202 RTC_CTRLS // Please see dcl_rtc.h
1203#endif
1204#ifndef NONE_MODEM_I2C
1205 /* I2C control datas, please see dcl_i2c.h */
1206 I2C_CTRLS
1207#endif
1208#if 0
1209#ifndef NONE_MODEM_AUX
1210/* under construction !*/
1211/* under construction !*/
1212#endif
1213#endif
1214#ifndef NONE_MODEM_KBD
1215 /* KBD control datas, please see dcl_kbd.h */
1216 KBDS_CTRLS//Please see dcl_kbd.h
1217#endif
1218#ifndef NONE_MODEM_KBDH
1219 KBDH_CTRLS
1220#endif
1221#ifndef NONE_MODEM_PWM
1222 /* PWM control datas, please see dcl_PWM.h */
1223 PWM_CTRLS//Please see dcl_PWM.h
1224#endif
1225#ifndef NONE_MODEM_ALERTER
1226 ALERTER_CTRLS
1227#endif
1228#ifndef NONE_MODEM_TS
1229 /* TS control datas, please see dcl_ts.h */
1230 TS_CTRLS//Please see dcl_ts.h
1231#endif
1232#ifndef NONE_MODEM_SD
1233 /* Below is the ctrl structures for SD*/
1234 SD_CTRLS//Please see dcl_msdc.h
1235#endif
1236#ifndef NONE_MODEM_SDIO
1237 /* Below is the ctrl structures for SDIO*/
1238 SDIO_CTRLS//Please see dcl_msdc.h
1239#endif
1240#ifndef NONE_MODEM_USB
1241 /* Below is the control data structures for USB_DRV, please see dcl_usb_drv.h */
1242 USB_DRV_CTRLS
1243#endif
1244#ifndef NONE_MODEM_USBD
1245 /* Below is the control data structures for USB_HCD, please see dcl_usb_hcd.h */
1246 USB_HCD_CTRLS
1247#endif
1248#ifndef NONE_MODEM_OTG
1249 /* Below is the control data structures for OTG_DRV, please see dcl_otg_drv.h */
1250 OTG_DRV_CTRLS
1251#endif
1252#ifndef NONE_MODEM_IRDA
1253 /* Below is the ctrl structures for IRDA*/
1254 IRDA_CTRLS//Please see dcl_irda.h
1255#endif
1256#ifndef NONE_MODEM_SIM
1257 /* Below is the ctrl structures for SIM*/
1258 SIM_CTRLS//Please see dcl_sim.h
1259#endif
1260#ifndef NONE_MODEM_PMU
1261 /* Below is the ctrl structures for PMU */
1262 PMU_CTRLS//Please see dcl_pmu.h
1263#endif
1264#ifndef NONE_MODEM_PW
1265 /* Below is the ctrl structures for Power up reason */
1266 PW_CTRLS//Please see dcl_pW.h
1267#endif
1268#ifndef NONE_MODEM_CHR_USB_DET
1269 /* Below is the ctrl structures for Chr & USB detection */
1270 CHR_DET_CTRLS//Please see dcl_chr_usb_det.h
1271#endif
1272#ifndef NONE_MODEM_SPMI
1273 /* Below is the ctrl structures for SPMI */
1274 SPMI_CTRLS//Please see dcl_spmi.h
1275#endif
1276#ifndef NONE_MODEM_PXS
1277 /* Below is the ctrl structures for PXS */
1278 PXS_CTRLS//Please see dcl_pxs.h
1279#endif
1280#ifndef NONE_MODEM_SIM_GPIO
1281 /* Below is the ctrl structures for SIM_GPIO */
1282 SIMGPIO_CTRLS//Please see dcl_sim_gpio.h
1283#endif
1284#ifndef NONE_MODEM_F32K_CLK
1285 /* Below is the ctrl structures for SIM_GPIO */
1286 F32K_CLK_CTRLS//please see dcl_f32k_clk.h
1287#endif
1288#ifndef NONE_MODEM_IDC
1289 /* Below is the ctrl structures for IDC */
1290 IDC_CTRLS//please see dcl_idc.h
1291#endif
1292#ifndef NONE_MTAD
1293 /* Below is the ctrl structures for MTAD */
1294 MTAD_CTRLS//please check dcl_mtad.h
1295#endif
1296} DCL_CTRL_DATA_T;
1297
1298
1299/*definitions of structures are finished, undefine DCL_DEFINITION_STRUCT*/
1300#undef DCL_DEFINITION_STRUCT
1301#define DCL_DEFINITION_PROTOTYPE
1302
1303#ifndef NONE_MODEM_GPT
1304#include "dcl_gpt.h"
1305#endif
1306#ifndef NONE_MODEM_GPIO
1307#include "dcl_gpio.h"
1308#endif
1309#ifndef NONE_MODEM_UART
1310#include "dcl_uart.h"
1311#endif
1312#ifndef NONE_MODEM_WDT
1313#include "dcl_wdt.h"
1314#endif
1315#ifndef NONE_MODEM_ADC
1316#include "dcl_adc.h"
1317#endif
1318#ifndef NONE_MODEM_BMT
1319#include "dcl_bmt.h"
1320#endif
1321#ifndef NONE_MODEM_PFC
1322#include "dcl_pfc.h"
1323#endif
1324#ifndef NONE_MODEM_RTC
1325#include "dcl_rtc.h"
1326#endif
1327#ifndef NONE_MODEM_I2C
1328#include "dcl_i2c.h"
1329#endif
1330#ifndef NONE_MODEM_AUX
1331#include "dcl_aux.h"
1332#endif
1333#if !defined(NONE_MODEM_PWM) && !defined(NONE_MODEM_ALERTER)
1334#include "dcl_pwm.h"
1335#endif
1336#ifndef NONE_MODEM_KBDH
1337#include "DclH_kbd.h"
1338#endif
1339#ifndef NONE_MODEM_KBD
1340#include "DclS_kbd.h"
1341#endif
1342#ifndef NONE_MODEM_STS
1343#include "dcl_sts.h"
1344#endif
1345#ifndef NONE_MODEM_MSDC
1346#include "dcl_msdc.h"
1347#endif
1348#ifndef NONE_MODEM_USB
1349#include "dcl_usb_drv.h"
1350#endif
1351#ifndef NONE_MODEM_USBD
1352#include "dcl_usb_hcd.h"
1353#endif
1354#ifndef NONE_MODEM_OTG
1355#include "dcl_otg_drv.h"
1356#endif
1357#ifndef NONE_MODEM_IRDA
1358#include "dcl_irda.h"
1359#endif
1360#ifndef NONE_MODEM_SIM
1361#include "dcl_sim.h"
1362#endif
1363#ifndef NONE_MODEM_PMU
1364#include "dcl_pmu.h"
1365#endif
1366#ifndef NONE_MODEM_PW
1367#include "dcl_pw.h"
1368#endif
1369#ifndef NONE_MODEM_CHR_USB_DET
1370#include "dcl_chr_det.h"
1371#endif
1372#ifndef NONE_MODEM_SPMI
1373#include "dcl_spmi.h"
1374#endif
1375#ifndef NONE_MODEM_PXS
1376#include "dcl_pxs.h"
1377#endif
1378#ifndef NONE_MODEM_SIM_GPIO
1379#include "dcl_sim_gpio.h"
1380#endif
1381#ifndef NONE_MODEM_F32K_CLK
1382#include "dcl_f32k_clk.h"
1383#endif
1384#ifndef NONE_MODEM_IDC
1385#include "dcl_idc.h"
1386#endif
1387#ifndef NONE_MTAD
1388#define DCL_DEFINITION_PROTOTYPE
1389#include "dcl_mtad.h"
1390#endif
1391
1392#undef DCL_DEFINITION_PROTOTYPE
1393
1394
1395#endif /* __DCL_H__ */