ARC-GLC_IODefine.h
7.74 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
/*******************************************************************************
* Function Name : _ARC_GLC_IODEFINE_H_
* Description : Define ARC_GLC_IO initial
* Input : Ë«ÏòDZ·üʽ
* Output :
* Return :
*******************************************************************************/
#ifndef _ARC_GLC_IODEFINE_H_
#define _ARC_GLC_IODEFINE_H_
#include <stm32f4xx.h>
/***************************************
INPUT24V_PIN:
******************************************/
//---------------------------------------------------
#define INPUT24V1_PIN GPIO_Pin_7
#define INPUT24V1_PORT GPIOI
#define INPUT24V2_PIN GPIO_Pin_6
#define INPUT24V2_PORT GPIOI
#define INPUT24V3_PIN GPIO_Pin_5
#define INPUT24V3_PORT GPIOI
#define INPUT24V4_PIN GPIO_Pin_4
#define INPUT24V4_PORT GPIOI
#define INPUT24V5_PIN GPIO_Pin_1
#define INPUT24V5_PORT GPIOE
#define INPUT24V6_PIN GPIO_Pin_0
#define INPUT24V6_PORT GPIOE
#define INPUT24V7_PIN GPIO_Pin_9
#define INPUT24V7_PORT GPIOB
#define INPUT24V8_PIN GPIO_Pin_8
#define INPUT24V8_PORT GPIOB
#define INPUT24V9_PIN GPIO_Pin_7
#define INPUT24V9_PORT GPIOB
#define INPUT24V10_PIN GPIO_Pin_4
#define INPUT24V10_PORT GPIOB
#define INPUT24V11_PIN GPIO_Pin_15
#define INPUT24V11_PORT GPIOG
#define INPUT24V12_PIN GPIO_Pin_13
#define INPUT24V12_PORT GPIOG
#define INPUT24V13_PIN GPIO_Pin_12
#define INPUT24V13_PORT GPIOG
#define INPUT24V14_PIN GPIO_Pin_11
#define INPUT24V14_PORT GPIOG
#define INPUT24V15_PIN GPIO_Pin_10
#define INPUT24V15_PORT GPIOG
#define INPUT24V16_PIN GPIO_Pin_7
#define INPUT24V16_PORT GPIOD
#define INPUT24V17_PIN GPIO_Pin_4
#define INPUT24V17_PORT GPIOD
#define INPUT24V18_PIN GPIO_Pin_3
#define INPUT24V18_PORT GPIOD
#define INPUT24V19_PIN GPIO_Pin_1
#define INPUT24V19_PORT GPIOD
#define INPUT24V20_PIN GPIO_Pin_0
#define INPUT24V20_PORT GPIOD
#define INPUT24V21_PIN GPIO_Pin_15
#define INPUT24V21_PORT GPIOA
#define INPUT24V22_PIN GPIO_Pin_3
#define INPUT24V22_PORT GPIOI
#define INPUT24V23_PIN GPIO_Pin_2
#define INPUT24V23_PORT GPIOI
#define INPUT24V24_PIN GPIO_Pin_1
#define INPUT24V24_PORT GPIOI
#define INPUT24V25_PIN GPIO_Pin_0
#define INPUT24V25_PORT GPIOI
#define INPUT24V26_PIN GPIO_Pin_15
#define INPUT24V26_PORT GPIOH
#define INPUT24V27_PIN GPIO_Pin_14
#define INPUT24V27_PORT GPIOH
#define INPUT24V28_PIN GPIO_Pin_13
#define INPUT24V28_PORT GPIOH
#define INPUT24V29_PIN GPIO_Pin_9
#define INPUT24V29_PORT GPIOC
#define INPUT24V30_PIN GPIO_Pin_8
#define INPUT24V30_PORT GPIOG
#define INPUT24V31_PIN GPIO_Pin_7
#define INPUT24V31_PORT GPIOG
#define INPUT24V32_PIN GPIO_Pin_6
#define INPUT24V32_PORT GPIOG
#define INPUT24V33_PIN GPIO_Pin_5
#define INPUT24V33_PORT GPIOG
#define INPUT24V34_PIN GPIO_Pin_4
#define INPUT24V34_PORT GPIOG
#define INPUT24V35_PIN GPIO_Pin_3
#define INPUT24V35_PORT GPIOG
#define INPUT24V36_PIN GPIO_Pin_2
#define INPUT24V36_PORT GPIOG
#define INPUT24V37_PIN GPIO_Pin_15
#define INPUT24V37_PORT GPIOD
#define INPUT24V38_PIN GPIO_Pin_14
#define INPUT24V38_PORT GPIOD
#define INPUT24V39_PIN GPIO_Pin_11
#define INPUT24V39_PORT GPIOD
#define INPUT24V40_PIN GPIO_Pin_10
#define INPUT24V40_PORT GPIOD
/*********************************************
OUTPUT24V_PIN:
**********************************************/
//---------------------------------------------------
#define OUTPUT24V1_PIN GPIO_Pin_2
#define OUTPUT24V1_PORT GPIOH
#define OUTPUT24V2_PIN GPIO_Pin_3
#define OUTPUT24V2_PORT GPIOH
#define OUTPUT24V3_PIN GPIO_Pin_4
#define OUTPUT24V3_PORT GPIOH
#define OUTPUT24V4_PIN GPIO_Pin_5
#define OUTPUT24V4_PORT GPIOH
#define OUTPUT24V5_PIN GPIO_Pin_3
#define OUTPUT24V5_PORT GPIOA
#define OUTPUT24V6_PIN GPIO_Pin_4
#define OUTPUT24V6_PORT GPIOA
#define OUTPUT24V7_PIN GPIO_Pin_5
#define OUTPUT24V7_PORT GPIOA
#define OUTPUT24V8_PIN GPIO_Pin_0
#define OUTPUT24V8_PORT GPIOB
#define OUTPUT24V9_PIN GPIO_Pin_1
#define OUTPUT24V9_PORT GPIOB
#define OUTPUT24V10_PIN GPIO_Pin_11
#define OUTPUT24V10_PORT GPIOF
#define OUTPUT24V11_PIN GPIO_Pin_12
#define OUTPUT24V11_PORT GPIOF
#define OUTPUT24V12_PIN GPIO_Pin_13
#define OUTPUT24V12_PORT GPIOF
#define OUTPUT24V13_PIN GPIO_Pin_14
#define OUTPUT24V13_PORT GPIOF
#define OUTPUT24V14_PIN GPIO_Pin_15
#define OUTPUT24V14_PORT GPIOF
#define OUTPUT24V15_PIN GPIO_Pin_0
#define OUTPUT24V15_PORT GPIOG
#define OUTPUT24V16_PIN GPIO_Pin_1
#define OUTPUT24V16_PORT GPIOG
#define OUTPUT24V17_PIN GPIO_Pin_7
#define OUTPUT24V17_PORT GPIOE
#define OUTPUT24V18_PIN GPIO_Pin_8
#define OUTPUT24V18_PORT GPIOE
#define OUTPUT24V19_PIN GPIO_Pin_9
#define OUTPUT24V19_PORT GPIOE
#define OUTPUT24V20_PIN GPIO_Pin_10
#define OUTPUT24V20_PORT GPIOE
#define OUTPUT24V21_PIN GPIO_Pin_12
#define OUTPUT24V21_PORT GPIOE
#define OUTPUT24V22_PIN GPIO_Pin_13
#define OUTPUT24V22_PORT GPIOE
#define OUTPUT24V23_PIN GPIO_Pin_14
#define OUTPUT24V23_PORT GPIOE
#define OUTPUT24V24_PIN GPIO_Pin_15
#define OUTPUT24V24_PORT GPIOE
#define OUTPUT24V25_PIN GPIO_Pin_7
#define OUTPUT24V25_PORT GPIOH
#define OUTPUT24V26_PIN GPIO_Pin_8
#define OUTPUT24V26_PORT GPIOH
#define OUTPUT24V27_PIN GPIO_Pin_9
#define OUTPUT24V27_PORT GPIOH
#define OUTPUT24V28_PIN GPIO_Pin_11
#define OUTPUT24V28_PORT GPIOH
/******************************************************/
static GPIO_TypeDef* INPUT24V_PORT_List[40] =
{
INPUT24V1_PORT,
INPUT24V2_PORT,
INPUT24V3_PORT,
INPUT24V4_PORT,
INPUT24V5_PORT,
INPUT24V6_PORT,
INPUT24V7_PORT,
INPUT24V8_PORT,
INPUT24V9_PORT,
INPUT24V10_PORT,
INPUT24V11_PORT,
INPUT24V12_PORT,
INPUT24V13_PORT,
INPUT24V14_PORT,
INPUT24V15_PORT,
INPUT24V16_PORT,
INPUT24V17_PORT,
INPUT24V18_PORT,
INPUT24V19_PORT,
INPUT24V20_PORT,
INPUT24V21_PORT,
INPUT24V22_PORT,
INPUT24V23_PORT,
INPUT24V24_PORT,
INPUT24V25_PORT,
INPUT24V26_PORT,
INPUT24V27_PORT,
INPUT24V28_PORT,
INPUT24V29_PORT,
INPUT24V30_PORT,
INPUT24V31_PORT,
INPUT24V32_PORT,
INPUT24V33_PORT,
INPUT24V34_PORT,
INPUT24V35_PORT,
INPUT24V36_PORT,
INPUT24V37_PORT,
INPUT24V38_PORT,
INPUT24V39_PORT,
INPUT24V40_PORT
};
static uint16_t INPUT24V_PIN_List[40] =
{
INPUT24V1_PIN,
INPUT24V2_PIN,
INPUT24V3_PIN,
INPUT24V4_PIN,
INPUT24V5_PIN,
INPUT24V6_PIN,
INPUT24V7_PIN,
INPUT24V8_PIN,
INPUT24V9_PIN,
INPUT24V10_PIN,
INPUT24V11_PIN,
INPUT24V12_PIN,
INPUT24V13_PIN,
INPUT24V14_PIN,
INPUT24V15_PIN,
INPUT24V16_PIN,
INPUT24V17_PIN,
INPUT24V18_PIN,
INPUT24V19_PIN,
INPUT24V20_PIN,
INPUT24V21_PIN,
INPUT24V22_PIN,
INPUT24V23_PIN,
INPUT24V24_PIN,
INPUT24V25_PIN,
INPUT24V26_PIN,
INPUT24V27_PIN,
INPUT24V28_PIN,
INPUT24V29_PIN,
INPUT24V30_PIN,
INPUT24V31_PIN,
INPUT24V32_PIN,
INPUT24V33_PIN,
INPUT24V34_PIN,
INPUT24V35_PIN,
INPUT24V36_PIN,
INPUT24V37_PIN,
INPUT24V38_PIN,
INPUT24V39_PIN,
INPUT24V40_PIN
};
static GPIO_TypeDef* OUTPUT24V_PORT_List[28] =
{
OUTPUT24V1_PORT,
OUTPUT24V2_PORT,
OUTPUT24V3_PORT,
OUTPUT24V4_PORT,
OUTPUT24V5_PORT,
OUTPUT24V6_PORT,
OUTPUT24V7_PORT,
OUTPUT24V8_PORT,
OUTPUT24V9_PORT,
OUTPUT24V10_PORT,
OUTPUT24V11_PORT,
OUTPUT24V12_PORT,
OUTPUT24V13_PORT,
OUTPUT24V14_PORT,
OUTPUT24V15_PORT,
OUTPUT24V16_PORT,
OUTPUT24V17_PORT,
OUTPUT24V18_PORT,
OUTPUT24V19_PORT,
OUTPUT24V20_PORT
};
static uint16_t OUTPUT24V_PIN_List[28] =
{
OUTPUT24V1_PIN,
OUTPUT24V2_PIN,
OUTPUT24V3_PIN,
OUTPUT24V4_PIN,
OUTPUT24V5_PIN,
OUTPUT24V6_PIN,
OUTPUT24V7_PIN,
OUTPUT24V8_PIN,
OUTPUT24V9_PIN,
OUTPUT24V10_PIN,
OUTPUT24V11_PIN,
OUTPUT24V12_PIN,
OUTPUT24V13_PIN,
OUTPUT24V14_PIN,
OUTPUT24V15_PIN,
OUTPUT24V16_PIN,
OUTPUT24V17_PIN,
OUTPUT24V18_PIN,
OUTPUT24V19_PIN,
OUTPUT24V20_PIN
};
#endif