1menu "Hardware Drivers Config"
2
3config SOC_SERIES_GD32F30x
4    bool
5    default y
6
7config SOC_GD32307E
8    bool
9    select SOC_SERIES_GD32F30x
10    select RT_USING_COMPONENTS_INIT
11    select RT_USING_USER_MAIN
12    default y
13
14menu "Onboard Peripheral Drivers"
15
16endmenu
17
18menu "On-chip Peripheral Drivers"
19
20    config BSP_USING_GPIO
21        bool "Enable GPIO"
22        select RT_USING_PIN
23        default y
24
25    menuconfig BSP_USING_UART
26        bool "Enable UART"
27        default y
28        select RT_USING_SERIAL
29        if BSP_USING_UART
30            config BSP_USING_UART0
31                bool "Enable UART0"
32                default n
33
34            config BSP_UART0_RX_USING_DMA
35                bool "Enable UART0 RX DMA"
36                depends on BSP_USING_UART0
37                select RT_SERIAL_USING_DMA
38                default n
39
40            config BSP_USING_UART1
41                bool "Enable UART1"
42                default y
43
44            config BSP_UART1_RX_USING_DMA
45                bool "Enable UART1 RX DMA"
46                depends on BSP_USING_UART1
47                select RT_SERIAL_USING_DMA
48                default n
49
50            config BSP_USING_UART2
51                bool "Enable UART2"
52                default n
53
54            config BSP_UART2_RX_USING_DMA
55                bool "Enable UART2 RX DMA"
56                depends on BSP_USING_UART2
57                select RT_SERIAL_USING_DMA
58                default n
59
60            config BSP_USING_UART3
61                bool "Enable UART3"
62                default n
63
64            config BSP_UART3_RX_USING_DMA
65                bool "Enable UART3 RX DMA"
66                depends on BSP_USING_UART3
67                select RT_SERIAL_USING_DMA
68                default n
69
70            config BSP_USING_UART4
71                bool "Enable UART4"
72                default n
73
74            config BSP_UART4_RX_USING_DMA
75                bool "Enable UART4 RX DMA"
76                depends on BSP_USING_UART4
77                select RT_SERIAL_USING_DMA
78                default n
79
80        endif
81
82    menuconfig BSP_USING_SPI
83        bool "Enable SPI BUS"
84        default n
85        select RT_USING_SPI
86        if BSP_USING_SPI
87            config BSP_USING_SPI1
88                bool "Enable SPI1 BUS"
89                default n
90
91            config BSP_SPI1_TX_USING_DMA
92                bool "Enable SPI1 TX DMA"
93                depends on BSP_USING_SPI1
94                default n
95
96            config BSP_SPI1_RX_USING_DMA
97                bool "Enable SPI1 RX DMA"
98                depends on BSP_USING_SPI1
99                select BSP_SPI1_TX_USING_DMA
100                default n
101        endif
102
103    menuconfig BSP_USING_I2C1
104        bool "Enable I2C1 BUS (software simulation)"
105        default n
106        select RT_USING_I2C
107        select RT_USING_I2C_BITOPS
108        select RT_USING_PIN
109        if BSP_USING_I2C1
110            config BSP_I2C1_SCL_PIN
111                int "i2c1 scl pin number"
112                range 1 216
113                default 24
114            config BSP_I2C1_SDA_PIN
115                int "I2C1 sda pin number"
116                range 1 216
117                default 25
118        endif
119
120    menuconfig BSP_USING_ADC
121        bool "Enable ADC"
122        default n
123        select RT_USING_ADC
124        if BSP_USING_ADC
125            config BSP_USING_ADC0
126                bool "Enable ADC0"
127                default n
128
129            config BSP_USING_ADC1
130                bool "Enable ADC1"
131                default n
132        endif
133
134    menuconfig BSP_USING_TIM
135        bool "Enable timer"
136        default n
137        select RT_USING_HWTIMER
138        if BSP_USING_TIM
139            config BSP_USING_TIM10
140                bool "Enable TIM10"
141                default n
142
143            config BSP_USING_TIM11
144                bool "Enable TIM11"
145                default n
146
147            config BSP_USING_TIM12
148                bool "Enable TIM13"
149                default n
150        endif
151
152    menuconfig BSP_USING_ONCHIP_RTC
153        bool "Enable RTC"
154        select RT_USING_RTC
155        default n
156        if BSP_USING_ONCHIP_RTC
157            choice
158                prompt "Select clock source"
159                default BSP_RTC_USING_LSE
160
161                config BSP_RTC_USING_LSE
162                    bool "RTC USING LSE"
163
164                config BSP_RTC_USING_LSI
165                    bool "RTC USING LSI"
166            endchoice
167        endif
168
169    config BSP_USING_WDT
170        bool "Enable Watchdog Timer"
171        select RT_USING_WDT
172        default n
173
174    config BSP_USING_SDIO
175        bool "Enable SDIO"
176        select RT_USING_SDIO
177        select RT_USING_DFS
178        default n
179
180    config BSP_USING_USBD
181        bool "Enable USB Device"
182        select RT_USING_USB_DEVICE
183        default n
184
185    menuconfig BSP_USING_USBH
186        bool "Enable USB Host"
187        select RT_USING_USB_HOST
188        default n
189        if BSP_USING_USBH
190            menuconfig RT_USBH_MSTORAGE
191                bool "Enable Udisk Drivers"
192                default n
193                if RT_USBH_MSTORAGE
194                    config UDISK_MOUNTPOINT
195                    string "Udisk mount dir"
196                    default "/"
197                endif
198        endif
199
200    source "$(BSP_DIR)/../libraries/gd32_drivers/Kconfig"
201
202endmenu
203
204menu "Board extended module Drivers"
205
206endmenu
207
208endmenu
209