1menu "Hardware Drivers Config" 2 3config SOC_SWM320 4 bool 5 select ARCH_ARM_CORTEX_M4 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 (A2/RX,A3/TX)" 19 default y 20 config BSP_USING_UART1 21 bool "Enable UART1 (C2/RX,C3/TX)" 22 default n 23 config BSP_USING_UART2 24 bool "Enable UART2 (C4/RX,C5/TX)" 25 default n 26 config BSP_USING_UART3 27 bool "Enable UART3 (C6/RX,C7/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" 47 default n 48 config BSP_USING_ADC0_CHN1 49 bool "Enable ADC0_CHN1" 50 default n 51 config BSP_USING_ADC0_CHN2 52 bool "Enable ADC0_CHN2" 53 default n 54 config BSP_USING_ADC0_CHN3 55 bool "Enable ADC0_CHN3" 56 default n 57 config BSP_USING_ADC0_CHN4 58 bool "Enable ADC0_CHN4(A12)" 59 default n 60 config BSP_USING_ADC0_CHN5 61 bool "Enable ADC0_CHN5(A11)" 62 default n 63 config BSP_USING_ADC0_CHN6 64 bool "Enable ADC0_CHN6(A10)" 65 default n 66 config BSP_USING_ADC0_CHN7 67 bool "Enable ADC0_CHN7(A9)" 68 default n 69 endif 70 config BSP_USING_ADC1 71 bool "Enable ADC1" 72 default n 73 if BSP_USING_ADC1 74 config BSP_USING_ADC1_CHN0 75 bool "Enable ADC1_CHN0(C7)" 76 default n 77 config BSP_USING_ADC1_CHN1 78 bool "Enable ADC1_CHN1(C6)" 79 default n 80 config BSP_USING_ADC1_CHN2 81 bool "Enable ADC1_CHN2(C5)" 82 default n 83 config BSP_USING_ADC1_CHN3 84 bool "Enable ADC1_CHN3(C4)" 85 default n 86 config BSP_USING_ADC1_CHN4 87 bool "Enable ADC1_CHN4(N0)" 88 default n 89 config BSP_USING_ADC1_CHN5 90 bool "Enable ADC1_CHN5(N1)" 91 default n 92 config BSP_USING_ADC1_CHN6 93 bool "Enable ADC1_CHN6(N2)" 94 default n 95 config BSP_USING_ADC1_CHN7 96 bool "Enable ADC1_CHN7" 97 default n 98 endif 99 endif 100 101 menuconfig BSP_USING_TIM 102 bool "Enable HWTIMER" 103 default n 104 select RT_USING_HWTIMER 105 if BSP_USING_TIM 106 config BSP_USING_TIM0 107 bool "Enable TIM0" 108 default n 109 config BSP_USING_TIM1 110 bool "Enable TIM1" 111 default n 112 config BSP_USING_TIM2 113 bool "Enable TIM2" 114 default n 115 config BSP_USING_TIM3 116 bool "Enable TIM3" 117 default n 118 119 config BSP_USING_TIM4 120 bool "Enable TIM4" 121 default n 122 config BSP_USING_TIM5 123 bool "Enable TIM5" 124 default n 125 endif 126 127 menuconfig BSP_USING_I2C 128 bool "Enable I2C BUS (software simulation)" 129 default n 130 select RT_USING_I2C 131 select RT_USING_I2C_BITOPS 132 select RT_USING_PIN 133 if BSP_USING_I2C 134 config BSP_USING_I2C0 135 bool "Enable I2C0" 136 default n 137 if BSP_USING_I2C0 138 comment "Notice: PC2 --> 28; PC3 --> 29" 139 config BSP_I2C0_SCL_PIN 140 int "I2C0 scl pin number" 141 range 0 99 142 default 28 143 config BSP_I2C0_SDA_PIN 144 int "I2C0 sda pin number" 145 range 0 99 146 default 29 147 endif 148 config BSP_USING_I2C1 149 bool "Enable I2C1" 150 default n 151 if BSP_USING_I2C1 152 comment "Notice: PC6 --> 32; PC7 --> 33" 153 config BSP_I2C1_SCL_PIN 154 int "I2C1 scl pin number" 155 range 0 99 156 default 32 157 config BSP_I2C1_SDA_PIN 158 int "I2C1 sda pin number" 159 range 0 99 160 default 33 161 endif 162 endif 163 164 menuconfig BSP_USING_PWM 165 bool "Enable PWM" 166 default n 167 select RT_USING_PWM 168 if BSP_USING_PWM 169 config BSP_USING_PWM0 170 bool "Enable PWM0" 171 default n 172 if BSP_USING_PWM0 173 config BSP_USING_PWM0A 174 bool "Enable PWM0A (C2)" 175 default n 176 config BSP_USING_PWM0B 177 bool "Enable PWM0B (C4)" 178 default n 179 endif 180 config BSP_USING_PWM1 181 bool "Enable PWM1" 182 default n 183 if BSP_USING_PWM1 184 config BSP_USING_PWM1A 185 bool "Enable PWM1A (C3)" 186 default n 187 config BSP_USING_PWM1B 188 bool "Enable PWM1B (C5)" 189 default n 190 endif 191 config BSP_USING_PWM2 192 bool "Enable PWM2" 193 default n 194 if BSP_USING_PWM2 195 config BSP_USING_PWM2A 196 bool "Enable PWM2A (N4)" 197 default n 198 config BSP_USING_PWM2B 199 bool "Enable PWM2B (N6)" 200 default n 201 endif 202 config BSP_USING_PWM3 203 bool "Enable PWM3" 204 default n 205 if BSP_USING_PWM3 206 config BSP_USING_PWM3A 207 bool "Enable PWM3A (N3)" 208 default n 209 config BSP_USING_PWM3B 210 bool "Enable PWM3B (N5)" 211 default n 212 endif 213 config BSP_USING_PWM4 214 bool "Enable PWM4" 215 default n 216 if BSP_USING_PWM4 217 config BSP_USING_PWM4A 218 bool "Enable PWM4A (N8)" 219 default n 220 config BSP_USING_PWM4B 221 bool "Enable PWM4B (N10)" 222 default n 223 endif 224 config BSP_USING_PWM5 225 bool "Enable PWM5" 226 default n 227 if BSP_USING_PWM5 228 config BSP_USING_PWM5A 229 bool "Enable PWM5A (N7)" 230 default n 231 config BSP_USING_PWM5B 232 bool "Enable PWM5B (N9)" 233 default n 234 endif 235 endif 236 237 config BSP_USING_RTC 238 bool "Enable RTC" 239 select RT_USING_RTC 240 default n 241 242 menuconfig BSP_USING_SPI 243 bool "Enable SPI BUS" 244 default n 245 select RT_USING_SPI 246 if BSP_USING_SPI 247 config BSP_USING_SPI0 248 bool "Enable SPI0 BUS(CS/P22,MISO/P19,MOSI/P18,CLK/P23)" 249 default n 250 251 config BSP_USING_SPI1 252 bool "Enable SPI1 BUS(CS/B6,MISO/B3,MOSI/B2,CLK/B1)" 253 default n 254 endif 255 256 config BSP_USING_WDT 257 bool "Enable Watchdog Timer" 258 select RT_USING_WDT 259 default n 260 261 config BSP_USING_CRC 262 bool "Enable CRC (CRC-32 0x04C11DB7 Polynomial)" 263 select RT_USING_HWCRYPTO 264 select RT_HWCRYPTO_USING_CRC 265 default n 266endmenu 267 268menu "Onboard Peripheral Drivers" 269 config BSP_USING_SDIO 270 bool "Enable SDCARD (sdio)" 271 select RT_USING_SDIO 272 select RT_USING_DFS 273 select RT_USING_DFS_ELMFAT 274 default n 275 276 menuconfig BSP_USING_EXT_SRAM 277 bool "Enable external sram" 278 select RT_USING_MEMHEAP 279 select RT_USING_MEMHEAP_AS_HEAP 280 default n 281 if BSP_USING_EXT_SRAM 282 config BSP_EXT_SRAM_SIZE 283 hex "external sram size" 284 default 0x100000 285 endif 286 287 menuconfig BSP_USING_NOR_FLASH 288 bool "Enable mtd nor flash" 289 select RT_USING_MTD_NOR 290 select PKG_USING_FTL_SRC 291 default n 292 if BSP_USING_NOR_FLASH 293 config BSP_NOR_FLASH_SIZE 294 hex "mtd nor flash size" 295 default 0x1000000 296 config BSP_NOR_FLASH_SECTOR_SIZE 297 hex "mtd nor flsah sector" 298 default 0x10000 299 endif 300endmenu 301 302menu "Offboard Peripheral Drivers" 303 304endmenu 305 306endmenu 307