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
|
/*
* Copyright : (C) 2022 Phytium Information Technology, Inc.
* All Rights Reserved.
*
* This program is OPEN SOURCE software: you can redistribute it and/or modify it
* under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd,
* either version 1.0 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Phytium Public License for more details.
*
*
* FilePath: fgpio_g.c
* Date: 2022-02-10 14:53:42
* LastEditTime: 2022-02-18 08:25:29
* Description: This files is for GPIO static configuration implementation
*
* Modify History:
* Ver Who Date Changes
* ----- ------ -------- --------------------------------------
* 1.0 zhugengyu 2022-3-1 init commit
*/
/***************************** Include Files *********************************/
#include "fparameters.h"
#include "fgpio_hw.h"
#include "fgpio.h"
/************************** Constant Definitions *****************************/
/**************************** Type Definitions *******************************/
/***************** Macros (Inline Functions) Definitions *********************/
/************************** Function Prototypes ******************************/
/************************** Variable Definitions *****************************/
/*****************************************************************************/
#if defined(FGPIO_VERSION_1) /* FT2000-4, D2000 */
const FGpioConfig fgpio_cfg_tbl[FGPIO_NUM] =
{
[FGPIO_ID_0] =
{
.instance_id = FGPIO_ID_0,
.base_addr = FGPIO_0_BASE_ADDR,
.irq_num = FGPIO_0_IRQ_NUM,
.irq_priority = 0
},
[FGPIO_ID_1] =
{
.instance_id = FGPIO_ID_1,
.base_addr = FGPIO_1_BASE_ADDR,
.irq_num = FGPIO_1_IRQ_NUM,
.irq_priority = 0
}
};
#elif defined(FGPIO_VERSION_2) /* E2000 GPIO 0 ~ 5 */
FGpioConfig fgpio_cfg_tbl[FGPIO_NUM] =
{
[FGPIO_ID_0] =
{
.instance_id = FGPIO_ID_0,
.base_addr = FGPIO_0_BASE_ADDR,
.irq_priority = 0
},
[FGPIO_ID_1] =
{
.instance_id = FGPIO_ID_1,
.base_addr = FGPIO_1_BASE_ADDR,
.irq_priority = 0
},
[FGPIO_ID_2] =
{
.instance_id = FGPIO_ID_2,
.base_addr = FGPIO_2_BASE_ADDR,
.irq_priority = 0
},
[FGPIO_ID_3] =
{
.instance_id = FGPIO_ID_3,
.base_addr = FGPIO_3_BASE_ADDR,
.irq_priority = 0
},
[FGPIO_ID_4] =
{
.instance_id = FGPIO_ID_4,
.base_addr = FGPIO_4_BASE_ADDR,
.irq_priority = 0
},
[FGPIO_ID_5] =
{
.instance_id = FGPIO_ID_5,
.base_addr = FGPIO_5_BASE_ADDR,
.irq_priority = 0
},
};
#endif
|