2021-08-31 14:41:35 +08:00
|
|
|
menu "Hardware Drivers Config"
|
|
|
|
|
2021-09-07 16:11:07 +08:00
|
|
|
config SOC_CH32F103C8
|
|
|
|
bool
|
|
|
|
select SOC_ARM_SERIES_CH32F103
|
|
|
|
select RT_USING_COMPONENTS_INIT
|
|
|
|
select RT_USING_USER_MAIN
|
|
|
|
default y
|
2021-08-31 14:41:35 +08:00
|
|
|
|
|
|
|
menu "On-chip Peripheral Drivers"
|
|
|
|
|
|
|
|
config BSP_USING_UART
|
2021-09-07 16:11:07 +08:00
|
|
|
bool "using onchip usart"
|
|
|
|
select RT_USING_SERIAL
|
|
|
|
default n
|
|
|
|
|
|
|
|
if BSP_USING_UART
|
|
|
|
config BSP_USING_UART1
|
|
|
|
bool "using uart1"
|
|
|
|
default n
|
|
|
|
|
|
|
|
config BSP_USING_UART2
|
|
|
|
bool "using uart2"
|
|
|
|
default n
|
|
|
|
|
|
|
|
config BSP_USING_UART3
|
|
|
|
bool "using uart3"
|
|
|
|
default n
|
|
|
|
endif
|
|
|
|
|
2021-08-31 14:41:35 +08:00
|
|
|
config BSP_USING_SPI
|
2021-09-07 16:11:07 +08:00
|
|
|
bool "using onchip spi"
|
|
|
|
select RT_USING_SPI
|
|
|
|
default n
|
|
|
|
|
|
|
|
if BSP_USING_SPI
|
|
|
|
config BSP_USING_SPI1
|
|
|
|
bool "using spi1"
|
|
|
|
default n
|
|
|
|
|
|
|
|
config BSP_USING_SPI2
|
|
|
|
bool "using spi2"
|
|
|
|
default n
|
|
|
|
endif
|
|
|
|
|
2021-08-31 14:41:35 +08:00
|
|
|
config BSP_USING_HWI2C
|
2021-09-07 16:11:07 +08:00
|
|
|
bool "using onchip i2c"
|
|
|
|
select RT_USING_I2C
|
|
|
|
default n
|
2021-08-31 14:41:35 +08:00
|
|
|
|
2021-09-07 16:11:07 +08:00
|
|
|
if BSP_USING_HWI2C
|
|
|
|
config BSP_USING_HWI2C1
|
|
|
|
bool "using i2c1"
|
|
|
|
default n
|
2021-08-31 14:41:35 +08:00
|
|
|
|
2021-09-07 16:11:07 +08:00
|
|
|
config BSP_USING_HWI2C2
|
|
|
|
bool "using i2c2"
|
|
|
|
default n
|
|
|
|
endif
|
2021-08-31 14:41:35 +08:00
|
|
|
|
|
|
|
config BSP_USING_IWDT
|
2021-09-07 16:11:07 +08:00
|
|
|
bool "using onchip iwdt"
|
|
|
|
select RT_USING_WDT
|
|
|
|
select LSI_VALUE
|
|
|
|
default n
|
2021-08-31 14:41:35 +08:00
|
|
|
|
|
|
|
config BSP_USING_RTC
|
2021-09-07 16:11:07 +08:00
|
|
|
bool "using onchip rtc"
|
|
|
|
select RT_USING_RTC
|
|
|
|
default n
|
2021-08-31 14:41:35 +08:00
|
|
|
|
2021-09-07 16:11:07 +08:00
|
|
|
if BSP_USING_RTC
|
|
|
|
config BSP_USING_RTC_LSI
|
|
|
|
bool "using LSI clock for rtc, if not, LSE default"
|
|
|
|
select LSI_VALUE
|
|
|
|
default n
|
|
|
|
endif
|
2021-08-31 14:41:35 +08:00
|
|
|
|
|
|
|
config LSI_VALUE
|
2021-09-07 16:11:07 +08:00
|
|
|
int
|
|
|
|
default 40000
|
2021-08-31 14:41:35 +08:00
|
|
|
|
2021-09-08 16:45:55 +08:00
|
|
|
config BSP_USING_TIM
|
|
|
|
bool "using TIMx"
|
|
|
|
default n
|
|
|
|
|
|
|
|
if BSP_USING_TIM
|
|
|
|
config BSP_USING_HWTIMER
|
|
|
|
bool
|
|
|
|
select RT_USING_HWTIMER
|
|
|
|
default n
|
|
|
|
|
|
|
|
config BSP_USING_PWM
|
|
|
|
bool
|
|
|
|
select RT_USING_PWM
|
|
|
|
default n
|
|
|
|
|
|
|
|
config BSP_USING_TIM1
|
|
|
|
bool "using TIM1"
|
|
|
|
default n
|
|
|
|
|
|
|
|
if BSP_USING_TIM1
|
|
|
|
choice
|
2022-03-21 22:04:37 +08:00
|
|
|
prompt "using TIM1 as hwtimer or PWM mode"
|
2021-09-08 16:45:55 +08:00
|
|
|
default BSP_USING_TIM1_HWTIMER
|
|
|
|
|
|
|
|
config BSP_USING_TIM1_HWTIMER
|
|
|
|
bool "using TIM1 as hwtimer mode"
|
|
|
|
select BSP_USING_HWTIMER
|
|
|
|
|
|
|
|
config BSP_USING_TIM1_PWM
|
2022-03-21 22:04:37 +08:00
|
|
|
bool "using TIM1 as PWM mode"
|
2021-09-08 16:45:55 +08:00
|
|
|
select BSP_USING_PWM
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
if BSP_USING_TIM1_PWM
|
|
|
|
config BSP_USING_TIM1_PWM_CH1
|
2021-09-23 23:20:16 +08:00
|
|
|
bool "using TIM1 channel 1"
|
2021-09-08 16:45:55 +08:00
|
|
|
default n
|
|
|
|
|
|
|
|
config BSP_USING_TIM1_PWM_CH2
|
2021-09-23 23:20:16 +08:00
|
|
|
bool "using TIM1 channel 2"
|
2021-09-08 16:45:55 +08:00
|
|
|
default n
|
|
|
|
|
|
|
|
config BSP_USING_TIM1_PWM_CH3
|
2021-09-23 23:20:16 +08:00
|
|
|
bool "using TIM1 channel 3"
|
2021-09-08 16:45:55 +08:00
|
|
|
|
|
|
|
config BSP_USING_TIM1_PWM_CH4
|
2021-09-23 23:20:16 +08:00
|
|
|
bool "using TIM1 channel 4"
|
2021-09-08 16:45:55 +08:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
config BSP_USING_TIM2
|
|
|
|
bool "using TIM2"
|
|
|
|
default n
|
|
|
|
|
|
|
|
if BSP_USING_TIM2
|
|
|
|
choice
|
2022-03-21 22:04:37 +08:00
|
|
|
prompt "using TIM2 as hwtimer or PWM mode"
|
2021-09-08 16:45:55 +08:00
|
|
|
default BSP_USING_TIM2_HWTIMER
|
|
|
|
|
|
|
|
config BSP_USING_TIM2_HWTIMER
|
|
|
|
bool "using TIM2 as hwtimer mode"
|
|
|
|
select BSP_USING_HWTIMER
|
|
|
|
|
|
|
|
config BSP_USING_TIM2_PWM
|
2022-03-21 22:04:37 +08:00
|
|
|
bool "using TIM2 as PWM mode"
|
2021-09-08 16:45:55 +08:00
|
|
|
select BSP_USING_PWM
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
if BSP_USING_TIM2_PWM
|
|
|
|
config BSP_USING_TIM2_PWM_CH1
|
2021-09-23 23:20:16 +08:00
|
|
|
bool "using TIM2 channel 1"
|
2021-09-08 16:45:55 +08:00
|
|
|
default n
|
|
|
|
|
|
|
|
config BSP_USING_TIM2_PWM_CH2
|
2021-09-23 23:20:16 +08:00
|
|
|
bool "using TIM2 channel 2"
|
2021-09-08 16:45:55 +08:00
|
|
|
default n
|
|
|
|
|
|
|
|
config BSP_USING_TIM2_PWM_CH3
|
2021-09-23 23:20:16 +08:00
|
|
|
bool "using TIM2 channel 3"
|
2021-09-08 16:45:55 +08:00
|
|
|
|
|
|
|
config BSP_USING_TIM2_PWM_CH4
|
2021-09-23 23:20:16 +08:00
|
|
|
bool "using TIM2 channel 4"
|
2021-09-08 16:45:55 +08:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
config BSP_USING_TIM3
|
|
|
|
bool "using TIM3"
|
|
|
|
default n
|
|
|
|
|
|
|
|
if BSP_USING_TIM3
|
|
|
|
choice
|
2022-03-21 22:04:37 +08:00
|
|
|
prompt "using TIM3 as hwtimer or PWM mode"
|
2021-09-08 16:45:55 +08:00
|
|
|
default BSP_USING_TIM3_HWTIMER
|
|
|
|
|
|
|
|
config BSP_USING_TIM3_HWTIMER
|
|
|
|
bool "using TIM3 as hwtimer mode"
|
|
|
|
select BSP_USING_HWTIMER
|
|
|
|
|
|
|
|
config BSP_USING_TIM3_PWM
|
2022-03-21 22:04:37 +08:00
|
|
|
bool "using TIM3 as PWM mode"
|
2021-09-08 16:45:55 +08:00
|
|
|
select BSP_USING_PWM
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
if BSP_USING_TIM3_PWM
|
|
|
|
config BSP_USING_TIM3_PWM_CH1
|
2021-09-23 23:20:16 +08:00
|
|
|
bool "using TIM3 channel 1"
|
2021-09-08 16:45:55 +08:00
|
|
|
default n
|
|
|
|
|
|
|
|
config BSP_USING_TIM3_PWM_CH2
|
2021-09-23 23:20:16 +08:00
|
|
|
bool "using TIM3 channel 2"
|
2021-09-08 16:45:55 +08:00
|
|
|
default n
|
|
|
|
|
|
|
|
config BSP_USING_TIM3_PWM_CH3
|
2021-09-23 23:20:16 +08:00
|
|
|
bool "using TIM3 channel 3"
|
2021-09-08 16:45:55 +08:00
|
|
|
|
|
|
|
config BSP_USING_TIM3_PWM_CH4
|
2021-09-23 23:20:16 +08:00
|
|
|
bool "using TIM3 channel 4"
|
2021-09-08 16:45:55 +08:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
config BSP_USING_TIM4
|
|
|
|
bool "using TIM4"
|
|
|
|
default n
|
|
|
|
|
|
|
|
if BSP_USING_TIM4
|
|
|
|
choice
|
2022-03-21 22:04:37 +08:00
|
|
|
prompt "using TIM4 as hwtimer or PWM mode"
|
2021-09-08 16:45:55 +08:00
|
|
|
default BSP_USING_TIM4_HWTIMER
|
|
|
|
|
|
|
|
config BSP_USING_TIM4_HWTIMER
|
|
|
|
bool "using TIM4 as hwtimer mode"
|
|
|
|
select BSP_USING_HWTIMER
|
|
|
|
|
|
|
|
config BSP_USING_TIM4_PWM
|
2022-03-21 22:04:37 +08:00
|
|
|
bool "using TIM4 as PWM mode"
|
2021-09-08 16:45:55 +08:00
|
|
|
select BSP_USING_PWM
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
if BSP_USING_TIM4_PWM
|
|
|
|
config BSP_USING_TIM4_PWM_CH1
|
2021-09-23 23:20:16 +08:00
|
|
|
bool "using TIM4 channel 1"
|
2021-09-08 16:45:55 +08:00
|
|
|
default n
|
|
|
|
|
|
|
|
config BSP_USING_TIM4_PWM_CH2
|
2021-09-23 23:20:16 +08:00
|
|
|
bool "using TIM4 channel 2"
|
2021-09-08 16:45:55 +08:00
|
|
|
default n
|
|
|
|
|
|
|
|
config BSP_USING_TIM4_PWM_CH3
|
2021-09-23 23:20:16 +08:00
|
|
|
bool "using TIM4 channel 3"
|
2021-09-08 16:45:55 +08:00
|
|
|
|
|
|
|
config BSP_USING_TIM4_PWM_CH4
|
2021-09-23 23:20:16 +08:00
|
|
|
bool "using TIM4 channel 4"
|
2021-09-08 16:45:55 +08:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|
2021-08-31 14:41:35 +08:00
|
|
|
endmenu
|
|
|
|
|
|
|
|
menu "Onboard Peripheral Drivers"
|
2021-09-07 16:11:07 +08:00
|
|
|
|
2021-08-31 14:41:35 +08:00
|
|
|
endmenu
|
|
|
|
|
|
|
|
menu "Board extended module Drivers"
|
|
|
|
|
|
|
|
endmenu
|
|
|
|
|
|
|
|
endmenu
|