4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-19 15:53:31 +08:00
self-confident neko 642ba3bc93
新增CH32V307的硬件定时器功能 (#6545)
新增CH32V307的硬件定时器功能,并在CH32V307V-R1-1V0板卡上进行了测试。
2022-10-21 20:12:17 -04:00

45 lines
974 B
Python

from building import *
cwd = GetCurrentDir()
src = []
path = [cwd]
if GetDepend('SOC_RISCV_FAMILY_CH32'):
if GetDepend('BSP_USING_GPIO'):
src += ['drv_gpio.c']
if GetDepend('BSP_USING_UART'):
src += ['drv_usart.c']
if GetDepend('BSP_USING_ADC'):
src += ['drv_adc.c']
if GetDepend('BSP_USING_DAC'):
src += ['drv_dac.c']
if GetDepend('BSP_USING_SOFT_I2C'):
src += ['drv_soft_i2c.c']
if GetDepend('BSP_USING_SPI'):
src += ['drv_soft_spi.c','drv_spi.c']
if GetDepend('BSP_USING_RTC'):
src += ['drv_rtc.c']
if GetDepend('BSP_USING_IWDT'):
src += ['drv_iwdt.c']
if GetDepend('BSP_USING_CAN'):
src += ['drv_can.c']
if GetDepend('BSP_USING_PWM'):
src += ['drv_pwm.c']
if GetDepend('BSP_USING_HWTIMER'):
src += ['drv_hwtimer.c']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
Return('group')