1menu "Hardware Drivers Config"
2
3config SOC_SWM341
4    bool
5    select ARCH_ARM_CORTEX_M33
6    select RT_USING_COMPONENTS_INIT
7    select RT_USING_USER_MAIN
8    default y
9
10menu "On-chip Peripheral Drivers"
11
12    menuconfig BSP_USING_UART
13        bool "Enable UART"
14        default y
15        select RT_USING_SERIAL
16        if BSP_USING_UART
17            config BSP_USING_UART0
18                bool "Enable UART0 (M0/RX,M1/TX)"
19                default y
20            config BSP_USING_UART1
21                bool "Enable UART1 (D4/RX,D3/TX)"
22                default n
23            config BSP_USING_UART2
24                bool "Enable UART2 (C1/RX,C0/TX)"
25                default n
26            config BSP_USING_UART3
27                bool "Enable UART3 (C2/RX,C3/TX)"
28                default n
29        endif
30
31    config BSP_USING_GPIO
32        bool "Enable GPIO"
33        select RT_USING_PIN
34        default y
35
36    menuconfig BSP_USING_ADC
37        bool "Enable ADC"
38        default n
39        select RT_USING_ADC
40        if BSP_USING_ADC
41            config BSP_USING_ADC0
42                bool "Enable ADC0"
43                default n
44                if BSP_USING_ADC0
45                    config BSP_USING_ADC0_CHN0
46                        bool "Enable ADC0_CHN0(C6)"
47                        default n
48                    config BSP_USING_ADC0_CHN1
49                        bool "Enable ADC0_CHN1(C5)"
50                        default n
51                    config BSP_USING_ADC0_CHN2
52                        bool "Enable ADC0_CHN2(C4)"
53                        default n
54                    config BSP_USING_ADC0_CHN3
55                        bool "Enable ADC0_CHN3(C3)"
56                        default n
57                    config BSP_USING_ADC0_CHN4
58                        bool "Enable ADC0_CHN4(C2)"
59                        default n
60                    config BSP_USING_ADC0_CHN5
61                        bool "Enable ADC0_CHN5(C1)"
62                        default n
63                    config BSP_USING_ADC0_CHN6
64                        bool "Enable ADC0_CHN6(C0)"
65                        default n
66                    config BSP_USING_ADC0_CHN7
67                        bool "Enable ADC0_CHN7(A15)"
68                        default n
69          config BSP_USING_ADC0_CHN8
70                        bool "Enable ADC0_CHN8(A14)"
71                        default n
72          config BSP_USING_ADC0_CHN9
73                        bool "Enable ADC0_CHN9(A13)"
74                        default n
75          config BSP_USING_ADC0_CHN10
76                        bool "Enable ADC0_CHN10(A12)"
77                        default n
78          config BSP_USING_ADC0_CHN11
79                        bool "Enable ADC0_CHN11(A10)"
80                        default n
81                endif
82            config BSP_USING_ADC1
83                bool "Enable ADC1"
84                default n
85                if BSP_USING_ADC1
86                    config BSP_USING_ADC1_CHN0
87                        bool "Enable ADC1_CHN0(D1)"
88                        default n
89                    config BSP_USING_ADC1_CHN1
90                        bool "Enable ADC1_CHN1(D0)"
91                        default n
92                    config BSP_USING_ADC1_CHN2
93                        bool "Enable ADC1_CHN2(C13)"
94                        default n
95                    config BSP_USING_ADC1_CHN3
96                        bool "Enable ADC1_CHN3(C12)"
97                        default n
98                    config BSP_USING_ADC1_CHN4
99                        bool "Enable ADC1_CHN4(C11)"
100                        default n
101                    config BSP_USING_ADC1_CHN5
102                        bool "Enable ADC1_CHN5(C10)"
103                        default n
104                    config BSP_USING_ADC1_CHN6
105                        bool "Enable ADC1_CHN6(C9)"
106                        default n
107                endif
108        endif
109
110    config BSP_USING_DAC
111        bool "Enable DAC"
112        select RT_USING_DAC
113        default n
114
115    menuconfig BSP_USING_CAN
116        bool "Enable CAN"
117        default n
118        select RT_USING_CAN
119        if BSP_USING_CAN
120            config BSP_USING_CAN0
121                bool "Enable CAN0(TX/B4,RX/B5)"
122                default n
123            config BSP_USING_CAN1
124                bool "Enable CAN1(TX/B2,RX/B3)"
125                default n
126        endif
127
128    menuconfig BSP_USING_TIM
129        bool "Enable HWTIMER"
130        default n
131        select RT_USING_HWTIMER
132        if BSP_USING_TIM
133            config BSP_USING_TIM0
134                bool "Enable TIM0"
135                default n
136            config BSP_USING_TIM1
137                bool "Enable TIM1"
138                default n
139            config BSP_USING_TIM2
140                bool "Enable TIM2"
141                default n
142            config BSP_USING_TIM3
143                bool "Enable TIM3"
144                default n
145            config BSP_USING_TIM4
146                bool "Enable TIM4"
147                default n
148
149            config BSP_USING_BTIM0
150                bool "Enable BTIM0"
151                default n
152            config BSP_USING_BTIM1
153                bool "Enable BTIM1"
154                default n
155            config BSP_USING_BTIM2
156                bool "Enable BTIM2"
157                default n
158            config BSP_USING_BTIM3
159                bool "Enable BTIM3"
160                default n
161            config BSP_USING_BTIM4
162                bool "Enable BTIM4"
163                default n
164            config BSP_USING_BTIM5
165                bool "Enable BTIM5"
166                default n
167            config BSP_USING_BTIM6
168                bool "Enable BTIM6"
169                default n
170            config BSP_USING_BTIM7
171                bool "Enable BTIM7"
172                default n
173            config BSP_USING_BTIM8
174                bool "Enable BTIM8"
175                default n
176            config BSP_USING_BTIM9
177                bool "Enable BTIM9"
178                default n
179            config BSP_USING_BTIM10
180                bool "Enable BTIM10"
181                default n
182            config BSP_USING_BTIM11
183                bool "Enable BTIM11"
184                default n
185        endif
186
187    menuconfig BSP_USING_I2C
188        bool "Enable I2C BUS (software simulation)"
189        default n
190        select RT_USING_I2C
191        select RT_USING_I2C_BITOPS
192        select RT_USING_PIN
193        if BSP_USING_I2C
194            config BSP_USING_I2C0
195                bool "Enable I2C0"
196                default n
197                if BSP_USING_I2C0
198                    config BSP_I2C0_SCL_PIN
199                        int "I2C0 scl pin number"
200                        range 0 111
201                        default 1
202                    config BSP_I2C0_SDA_PIN
203                        int "I2C0 sda pin number"
204                        range 0 111
205                        default 0
206                endif
207            config BSP_USING_I2C1
208                bool "Enable I2C1"
209                default n
210                if BSP_USING_I2C1
211                    config BSP_I2C1_SCL_PIN
212                        int "I2C1 scl pin number"
213                        range 0 111
214                        default 37
215                    config BSP_I2C1_SDA_PIN
216                        int "I2C1 sda pin number"
217                        range 0 111
218                        default 36
219                endif
220        endif
221
222    menuconfig BSP_USING_PWM
223        bool "Enable PWM"
224        default n
225        select RT_USING_PWM
226        if BSP_USING_PWM
227        comment "Notice: PWMA,PWMAN,PWMB,PWMBN are all channel0,the performance is the same"
228        config BSP_USING_PWM0
229            bool "Enable PWM0"
230            default n
231            if BSP_USING_PWM0
232                config BSP_USING_PWM0A
233                    bool "Enable PWM0A (M1)"
234                    default n
235                config BSP_USING_PWM0AN
236                    bool "Enable PWM0AN (M4)"
237                    default n
238                config BSP_USING_PWM0B
239                    bool "Enable PWM0B (M2)"
240                    default n
241                config BSP_USING_PWM0BN
242                    bool "Enable PWM0BN (M5)"
243                    default n
244            endif
245        config BSP_USING_PWM1
246            bool "Enable PWM1"
247            default n
248            if BSP_USING_PWM1
249                config BSP_USING_PWM1A
250                    bool "Enable PWM1A (M3)"
251                    default n
252                config BSP_USING_PWM1AN
253                    bool "Enable PWM1AN (M6)"
254                    default n
255                config BSP_USING_PWM1B
256                    bool "Enable PWM1B (D9)"
257                    default n
258                config BSP_USING_PWM1BN
259                    bool "Enable PWM1BN (D8)"
260                    default n
261            endif
262        config BSP_USING_PWM2
263            bool "Enable PWM2"
264            default n
265            if BSP_USING_PWM2
266                config BSP_USING_PWM2A
267                    bool "Enable PWM2A (M12)"
268                    default n
269                config BSP_USING_PWM2AN
270                    bool "Enable PWM2AN (M9)"
271                    default n
272                config BSP_USING_PWM2B
273                    bool "Enable PWM2B (M11)"
274                    default n
275                config BSP_USING_PWM2BN
276                    bool "Enable PWM2BN (M8)"
277                    default n
278            endif
279        config BSP_USING_PWM3
280            bool "Enable PWM3"
281            default n
282            if BSP_USING_PWM3
283                config BSP_USING_PWM3A
284                    bool "Enable PWM3A (C2)"
285                    default n
286                config BSP_USING_PWM3AN
287                    bool "Enable PWM3AN (C3)"
288                    default n
289                config BSP_USING_PWM3B
290                    bool "Enable PWM3B (B1)"
291                    default n
292                config BSP_USING_PWM3BN
293                    bool "Enable PWM3BN (B0)"
294                    default n
295            endif
296        config BSP_USING_PWM4
297            bool "Enable PWM4"
298            default n
299            if BSP_USING_PWM4
300                config BSP_USING_PWM4A
301                    bool "Enable PWM4A (B15)"
302                    default n
303                config BSP_USING_PWM4AN
304                    bool "Enable PWM4AN (B14) NOTICE:SWDIO"
305                    default n
306                config BSP_USING_PWM4B
307                    bool "Enable PWM4B (B13)"
308                    default n
309                config BSP_USING_PWM4BN
310                    bool "Enable PWM4BN (B12) NOTICE:SWDCK"
311                    default n
312            endif
313        endif
314
315    config BSP_USING_RTC
316        bool "Enable RTC"
317        select RT_USING_RTC
318        default n
319
320    menuconfig BSP_USING_SPI
321        bool "Enable SPI BUS"
322        default n
323        select RT_USING_SPI
324        if BSP_USING_SPI
325            config BSP_USING_SPI0
326                bool "Enable SPI0 BUS(CS/M3,MISO/M4,MOSI/M5,CLK/M2)"
327                default n
328            config BSP_USING_SPI1
329                bool "Enable SPI1 BUS(CS/B5,MISO/B3,MOSI/B4,CLK/B2)"
330                default n
331        endif
332
333    config BSP_USING_WDT
334        bool "Enable Watchdog Timer"
335        select RT_USING_WDT
336        default n
337
338    config BSP_USING_CRC
339        bool "Enable CRC"
340        select RT_USING_HWCRYPTO
341        select RT_HWCRYPTO_USING_CRC
342        default n
343    config BSP_USING_RNG
344        bool "Enable RNG  (Random Number Generator)"
345        select RT_USING_HWCRYPTO
346        select RT_HWCRYPTO_USING_RNG
347        default n
348
349    config BSP_USING_SDIO
350        bool "Enable SDCARD (sdio)"
351        select RT_USING_SDIO
352        select RT_USING_DFS
353        select RT_USING_DFS_ELMFAT
354        default n
355
356    menuconfig BSP_USING_SDRAM
357        bool "Enable SDRAM"
358        select RT_USING_MEMHEAP
359        select RT_USING_MEMHEAP_AS_HEAP
360        select RT_USING_MEMHEAP_AUTO_BINDING
361        default n
362        if BSP_USING_SDRAM
363            config BSP_SDRAM_SIZE
364            hex "SDRAM size"
365            default 0x800000
366        endif
367
368    menuconfig BSP_USING_GT9147
369        bool "Enable gt9147(use i2c0)"
370        select RT_USING_TOUCH
371        select RT_TOUCH_PIN_IRQ
372        select BSP_USING_I2C
373        select BSP_USING_I2C0
374        select PKG_USING_GT9147
375        select PKG_USING_GT9147_LATEST_VERSION
376        default n
377        if BSP_USING_GT9147
378            config GT9147_RST_PIN
379                int "GT9147 rst pin number"
380                range 0 111
381                default 39
382            config GT9147_IRQ_PIN
383                int "GT9147 irq pin number"
384                range 0 111
385                default 48
386        endif
387    menuconfig BSP_USING_RGB_LCD
388        bool "Enable RGB LCD"
389        select BSP_USING_SDRAM
390        default n
391        if BSP_USING_RGB_LCD
392            config BSP_USING_LVGL
393                bool "Enable LVGL for LCD"
394                select PKG_USING_LVGL
395                default n
396        endif
397
398endmenu
399
400menu "Onboard Peripheral Drivers"
401
402endmenu
403
404menu "Offboard Peripheral Drivers"
405
406endmenu
407
408endmenu
409