dcl_common_config.h
3.53 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
/*****************************************************************************
* 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_common_config.h
*
* Project:
* --------
* Maui
*
* Description:
* ------------
* configuration file of DCL (Driver Common Layer).
*
* 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!
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*============================================================================
****************************************************************************/
#ifndef __DCL_COMMON_CONFIG_H__
#define __DCL_COMMON_CONFIG_H__
/////////////////////////////////////////////////////////////////
//This file used to add device driver to dcl_common
//Don't include in any other header file
/////////////////////////////////////////////////////////////////
extern DEV_Operations i2c_dev_operations;
extern DEV_Operations uart_dev_operations;
extern DEV_Operations gpio_dev_operations;
extern DEV_Operations spi_dev_operations;
extern DEV_Operations eint_dev_operations;
extern DEV_Operations dummy_device;
extern DEV_Utility uart_dev_query;
extern DEV_Utility eint_dev_query;
extern DCL_EVENT_MSG_MAP uart_event_msg_map;
extern DCL_EVENT_MSG_MAP eint_event_msg_map;
/********************************************************************
*This array is used to save the device driver interface.
*For each driver which want to install to this array:
*1. first element is 0 when install.
*2. second element is the start number of your device number group(DCL_DEV_T in dcl.h)
*3. third element is the end number of your device number group(DCL_DEV_T in dcl.h).
* The end number must be less than the start number add 0x100.
*4. Fourth element is the address of your driver. This can't be NULL.
*5. Five element is the Ultility instance address, which can be NULL if the driver will not use it.
*6. The last element is the map of event id to message id. This can be NULL if the driver will not use it.
*7. ATTENTION: The device number MUST BE grow from small to big. eg. If the driver's device group number is 0xA00,
* and the Devices[] has group 0x800~0x900 and 0xC00~0xD00, the new driver group must insert to the middle of these two drivers.
*********************************************************************/
DCL_DEVICE_T Devices[]={
{0,0,0x100,&uart_dev_operations,&uart_dev_query,&uart_event_msg_map},
{0,0x100,0x200,&i2c_dev_operations,NULL,NULL},
{0,0x200,0x300,&spi_dev_operations,NULL,NULL},
{0,0x300,0x400,&dummy_device,NULL,NULL},
{0,0x400,0x500,&gpio_dev_operations,NULL,NULL},
{0,0x1C00,0x1D00,&eint_dev_operations,&eint_dev_query,&eint_event_msg_map}
};
#endif