-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPort_Cfg_v2.h
More file actions
182 lines (137 loc) · 5.36 KB
/
Port_Cfg_v2.h
File metadata and controls
182 lines (137 loc) · 5.36 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
/*****************************************************************
*
* Module: Port_Cfg
*
* File Name: Port_Cfg.h
*
* Description: Header file for Port Module,
* implementation is based on AUTOSAR specfications.
* Contains symbolic names definitions.
*
*
* Author: Ahmed Wasfy
*
* Date: October 2, 2019
*******************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* Port Vendor ID in AUTOSAR */
#define PORT_VENDOR_ID_CFG_H (2020U)
/*
* SW Module Version is 1.0.0
*/
#define PORT_SW_MAJOR_VERSION_CFG_H (1U)
#define PORT_SW_MINOR_VERSION_CFG_H (0U)
#define PORT_SW_PATCH_VERSION_CFG_H (0U)
/*
* AUTOSAR Version is 4.3.1 compatible
*/
#define PORT_CFG_AR_RELEASE_PATCH_VERSION (1U)
#define PORT_MODULE_ID_VALUE 124
#define PORT_VENDOR_ID_VALUE 23
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Instance ID of the PORT Driver Component */
#define PORT_INSTANCE_ID_VALUE 0
/* Enables/Disables Development error detect */
#define PORT_DEV_ERROR_DETECT STD_OFF
/* Enables/Disables Port_SetPinDirection API */
#define PORT_SET_PIN_DIRECTION_API STD_ON
/* Enables/Disables Port_SetPinMode API */
#define PORT_SET_PIN_MODE_API STD_ON
/* Enables/Disables Port_GetVersionInfo API */
#define PORT_VERSION_INFO_API STD_ON
/* Pre-compile parameter for number of pins per each port */
#define PORT_NUMBER_OF_PORT_PINS (43U) (43U)
/* Number of configured port modes */
#define PORT_CONFIG_MODE_NUM (15U)
/* Precompile and Post Build option for setting the Pin direction,
according to its mode E.g. a pin used for an ADC must be configured
to be an in port. */
#define PORT_PIN_DIRECTION (STD_ON)
/* Precompile and Post Build option for changing a Pin
direction during runtime */
#define PORT_PIN_DIRECTION_CHANGEABLE (STD_ON)
/* Precompile and Post Build option for setting initial Pin mode
to be ADC, DIO, LIN, .. */
#define PORT_PIN_INITIAL_MODE (STD_ON)
/* Precompile and Post Build option for setting
Port Pin Level value from Port pin list. */
#define PORT_PIN_LEVEL_VALUE (STD_ON)
/* Precompile and Post Build option for setting Pin mode
to be ADC, DIO, LIN, .. */
#define PORT_PIN_MODE (STD_ON)
/* Precompile and Post Build option for Port pin mode changeability */
#define PORT_PIN_MODE_CHANGEABLE (STD_ON)
/* Port Pin Level value from Port pin list */
#if (PORT_PIN_LEVEL_VALUE == STD_ON)
#define PORT_PIN_LEVEL_HIGH (STD_HIGH)
#define PORT_PIN_LEVEL_LOW (STD_LOW)
#endif /* (PORT_PIN_LEVEL_VALUE == STD_ON) */
/* Port Pin MODE value */
#define PORT_PIN_MODE_NOT_USED (11U)
#define PORT_PIN_MODE_TRIGGER_ADC (12U)
#define PORT_PIN_MODE_ADC (0U)
#define PORT_PIN_MODE_DIO (1U)
#define PORT_PIN_MODE_CAN (2U)
#define PORT_PIN_MODE_GPT (3U)
#define PORT_PIN_MODE_WDG (4U)
#define PORT_PIN_MODE_FLEXRAY (5U)
#define PORT_PIN_MODE_ICU (6U)
#define PORT_PIN_MODE_LIN (7U)
#define PORT_PIN_MODE_MEM (8U)
#define PORT_PIN_MODE_PWM (9U)
#define PORT_PIN_MODE_SPI (10U)
#define PORT_PIN_NOT_ACTIVE (ffU)
/*
#DEFINE PORT_NUMBER_OF_PORT PINS (PRECOMPILED , ARRY NUMBER OF pins )
*/
/* Port Pin ID Handles */
#define PortA_PortPin0 (0U)
#define PortA_PortPin1 (1U)
#define PortA_PortPin2 (2U)
#define PortA_PortPin3 (3U)
#define PortA_PortPin4 (4U)
#define PortA_PortPin5 (5U)
#define PortA_PortPin6 (6U)
#define PortA_PortPin7 (7U)
#define PortB_PortPin0 (8U)
#define PortB_PortPin1 (9U)
#define PortB_PortPin2 (10U)
#define PortB_PortPin3 (11U)
#define PortB_PortPin4 (12U)
#define PortB_PortPin5 (13U)
#define PortB_PortPin6 (14U)
#define PortB_PortPin7 (15U)
#define PortC_PortPin0 (16U)
#define PortC_PortPin1 (17U)
#define PortC_PortPin2 (18U)
#define PortC_PortPin3 (19U)
#define PortC_PortPin4 (20U)
#define PortC_PortPin5 (21U)
#define PortC_PortPin6 (22U)
#define PortC_PortPin7 (23U)
#define PortD_PortPin0 (24U)
#define PortD_PortPin1 (25U)
#define PortD_PortPin2 (26U)
#define PortD_PortPin3 (27U)
#define PortD_PortPin4 (28U)
#define PortD_PortPin5 (29U)
#define PortD_PortPin6 (30U)
#define PortD_PortPin7 (31U)
#define PortE_PortPin0 (32U)
#define PortE_PortPin1 (33U)
#define PortE_PortPin2 (34U)
#define PortE_PortPin3 (35U)
#define PortE_PortPin4 (36U)
#define PortE_PortPin5 (37U)
#define PortF_PortPin0 (38U)
#define PortF_PortPin1 (39U)
#define PortF_PortPin2 (40U)
#define PortF_PortPin3 (41U)
#define PortF_PortPin4 (42U)