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