1menu "Hardware Drivers Config"
2
3menu "Onboard Peripheral Drivers"
4
5    config BSP_USING_STLINK_TO_USART
6        bool "Enable STLINK TO USART (uart1)"
7        select BSP_USING_UART
8        select BSP_USING_UART1
9        default y
10
11endmenu
12
13menu "On-chip Peripheral Drivers"
14
15    config BSP_USING_GPIO
16        bool "Enable GPIO"
17        select RT_USING_PIN
18        default y
19
20    menuconfig BSP_USING_UART
21        bool "Enable UART"
22        default y
23        select RT_USING_SERIAL
24        if BSP_USING_UART
25            config BSP_STM32_UART_V1_TX_TIMEOUT
26                int "UART TX timeout"
27                default 2000
28                depends on RT_USING_SERIAL_V1
29
30            config BSP_USING_UART1
31                bool "Enable UART1"
32                default y
33
34            config BSP_UART1_RX_USING_DMA
35                bool "Enable UART1 RX DMA"
36                depends on BSP_USING_UART1 && RT_SERIAL_USING_DMA
37                default n
38
39            config BSP_USING_LPUART1
40                bool "Enable LPUART1"
41                default n
42
43            config BSP_LPUART1_RX_USING_DMA
44                bool "Enable LPUART1 RX DMA"
45                depends on BSP_USING_LPUART1 && RT_SERIAL_USING_DMA
46                default n
47
48        endif
49
50    config BSP_USING_ON_CHIP_FLASH
51        bool "Enable on-chip FLASH"
52        default n
53
54    menuconfig BSP_USING_SPI
55        bool "Enable SPI BUS"
56        default n
57        select RT_USING_SPI
58        if BSP_USING_SPI
59            config BSP_USING_SPI1
60                bool "Enable SPI1 BUS"
61                default n
62
63            config BSP_SPI1_TX_USING_DMA
64                bool "Enable SPI1 TX DMA"
65                depends on BSP_USING_SPI1
66                default n
67
68            config BSP_SPI1_RX_USING_DMA
69                bool "Enable SPI1 RX DMA"
70                depends on BSP_USING_SPI1
71                select BSP_SPI1_TX_USING_DMA
72                default n
73
74        endif
75
76
77
78    menuconfig BSP_USING_I2C
79        bool "Enable I2C BUS"
80        default n
81        select RT_USING_I2C
82        select RT_USING_I2C_BITOPS
83        select RT_USING_PIN
84        if BSP_USING_I2C
85            menuconfig BSP_USING_I2C1
86                bool "Enable I2C1 BUS (software simulation)"
87                default y
88                if BSP_USING_I2C1
89                    comment "Notice: PB8 --> 24; PB9 --> 25"
90                    config BSP_I2C1_SCL_PIN
91                        int "i2c1 scl pin number"
92                        range 1 143
93                        default 24
94                    config BSP_I2C1_SDA_PIN
95                        int "I2C1 sda pin number"
96                        range 1 143
97                        default 25
98                endif
99
100            menuconfig BSP_USING_I2C3
101                bool "Enable I2C3 BUS (software simulation)"
102                default y
103                if BSP_USING_I2C3
104                    comment "Notice: PB13 --> 29; PAB6 -->30"
105                    config BSP_I2C3_SCL_PIN
106                        int "i2c3 scl pin number"
107                        range 1 143
108                        default 29
109                    config BSP_I2C3_SDA_PIN
110                        int "I2C3 sda pin number"
111                        range 1 143
112                        default 30
113                endif
114        endif
115
116    menuconfig BSP_USING_TIM
117        bool "Enable timer"
118        default n
119        select RT_USING_HWTIMER
120        if BSP_USING_TIM
121
122            config BSP_USING_TIM16
123                bool "Enable TIM16"
124                default n
125
126            config BSP_USING_TIM17
127                bool "Enable TIM17"
128                default n
129        endif
130
131    menuconfig BSP_USING_ADC
132        bool "Enable ADC"
133        default n
134        select RT_USING_ADC
135        if BSP_USING_ADC
136            config BSP_USING_ADC1
137                bool "Enable ADC1"
138                default n
139        endif
140
141    menuconfig BSP_USING_ONCHIP_RTC
142        bool "Enable RTC"
143        select RT_USING_RTC
144        default n
145        if BSP_USING_ONCHIP_RTC
146            choice
147                prompt "Select clock source"
148                default BSP_RTC_USING_LSE
149
150                config BSP_RTC_USING_LSE
151                    bool "RTC USING LSE"
152
153                config BSP_RTC_USING_LSI
154                    bool "RTC USING LSI"
155            endchoice
156        endif
157
158    source "$(BSP_DIR)/../libraries/HAL_Drivers/drivers/Kconfig"
159
160endmenu
161
162menu "Board extended module Drivers"
163
164endmenu
165
166endmenu
167