1menu "Hardware Drivers Config"
2
3config SOC_APM32F103VB
4    bool
5    select SOC_SERIES_APM32F1
6    select RT_USING_COMPONENTS_INIT
7    select RT_USING_USER_MAIN
8    default y
9
10menu "On-chip Peripheral Drivers"
11
12    config BSP_USING_GPIO
13        bool "Enable GPIO"
14        select RT_USING_PIN
15        default y
16
17    menuconfig BSP_USING_UART
18        bool "Enable UART"
19        default y
20        select RT_USING_SERIAL
21        if BSP_USING_UART
22            config BSP_USING_UART1
23                bool "Enable UART1"
24                default y
25            config BSP_USING_UART2
26                bool "Enable UART2"
27                default n
28        endif
29
30    menuconfig BSP_USING_ADC
31        bool "Enable ADC"
32        default n
33        select RT_USING_ADC
34        if BSP_USING_ADC
35            config BSP_USING_ADC1
36                bool "Enable ADC1"
37                default n
38            config BSP_USING_ADC2
39                bool "Enable ADC2"
40                default n
41            config BSP_USING_ADC3
42                bool "Enable ADC3"
43                default n
44        endif
45
46    menuconfig BSP_USING_DAC
47        bool "Enable DAC"
48        default n
49        select RT_USING_DAC
50        if BSP_USING_DAC
51            config BSP_USING_DAC1
52                bool "Enable DAC1"
53                default n
54        endif
55
56    menuconfig BSP_USING_ONCHIP_RTC
57        bool "Enable RTC"
58        select RT_USING_RTC
59        default n
60        if BSP_USING_ONCHIP_RTC
61            choice
62                prompt "Select clock source"
63                default BSP_RTC_USING_LSE
64
65                config BSP_RTC_USING_LSE
66                    bool "RTC USING LSE"
67
68                config BSP_RTC_USING_LSI
69                    bool "RTC USING LSI"
70            endchoice
71        endif
72
73    menuconfig BSP_USING_I2C
74        bool "Enable I2C BUS (software simulation)"
75        default n
76        select RT_USING_I2C
77        select RT_USING_I2C_BITOPS
78        select RT_USING_PIN
79        if BSP_USING_I2C
80            config BSP_USING_I2C1
81                bool "Enable I2C1 BUS"
82                if BSP_USING_I2C1
83                    comment "Notice: PB6 --> 22; PB7 --> 23"
84                    config BSP_I2C1_SCL_PIN
85                        int "i2c1 scl pin number"
86                        range 0 63
87                        default 22
88                    config BSP_I2C1_SDA_PIN
89                        int "I2C1 sda pin number"
90                        range 0 63
91                        default 23
92                endif
93            config BSP_USING_I2C2
94                bool "Enable I2C2 BUS"
95                if BSP_USING_I2C2
96                    comment "Notice: PA0 --> 0; PA1 --> 1"
97                    config BSP_I2C2_SCL_PIN
98                        int "i2c2 scl pin number"
99                        range 0 63
100                        default 0
101                    config BSP_I2C2_SDA_PIN
102                        int "I2C2 sda pin number"
103                        range 0 63
104                        default 1
105                endif
106        endif
107
108    menuconfig BSP_USING_SPI
109        bool "Enable SPI"
110        default n
111        select RT_USING_SPI
112        if BSP_USING_SPI
113            config BSP_USING_SPI1
114                bool "Enable SPI1"
115                default n
116
117            config BSP_USING_SPI2
118                bool "Enable SPI2"
119                default n
120
121            config BSP_USING_SPI3
122                bool "Enable SPI3"
123                default n
124        endif
125
126    menuconfig BSP_USING_TMR
127        bool "Enable Timer"
128        default n
129        select RT_USING_HWTIMER
130        if BSP_USING_TMR
131            config BSP_USING_TMR1
132                bool "Enable TMR1"
133                default n
134
135            config BSP_USING_TMR2
136                bool "Enable TMR2"
137                default n
138
139            config BSP_USING_TMR3
140                bool "Enable TMR3"
141                default n
142
143            config BSP_USING_TMR4
144                bool "Enable TMR4"
145                default n
146
147            config BSP_USING_TMR5
148                bool "Enable TMR5"
149                default n
150
151            config BSP_USING_TMR6
152                bool "Enable TMR6"
153                default n
154
155            config BSP_USING_TMR7
156                bool "Enable TMR7"
157                default n
158        endif
159
160    menuconfig BSP_USING_PWM
161        bool "Enable PWM"
162        default n
163        select RT_USING_PWM
164        if BSP_USING_PWM
165        menuconfig BSP_USING_PWM3
166            bool "Enable timer3 output PWM"
167            default n
168            if BSP_USING_PWM3
169                config BSP_USING_PWM3_CH1
170                    bool "Enable PWM3 channel1"
171                    default n
172
173                config BSP_USING_PWM3_CH2
174                    bool "Enable PWM3 channel2"
175                    default n
176
177                config BSP_USING_PWM3_CH3
178                    bool "Enable PWM3 channel3"
179                    default n
180
181                config BSP_USING_PWM3_CH4
182                    bool "Enable PWM3 channel4"
183                    default n
184            endif
185        endif
186
187    menuconfig BSP_USING_CAN
188        bool "Enable CAN"
189        default n
190        select RT_USING_CAN
191        if BSP_USING_CAN
192            config BSP_USING_CAN1
193                bool "Enable CAN1"
194                default n
195        endif
196
197    config BSP_USING_ON_CHIP_FLASH
198        bool "Enable on-chip FLASH"
199        default n
200
201    config BSP_USING_WDT
202        bool "Enable Watchdog Timer"
203        select RT_USING_WDT
204        default n
205
206endmenu
207
208endmenu
209