c17d5d509f
CH32V307 添加can驱动。 CAN1和CAN2均可以使用,而且调整好波特率
36 lines
748 B
Python
36 lines
748 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_I2C_BITOPS']):
|
|
src += ['drv_soft_i2c.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']
|
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
|
|
|
|
Return('group')
|