2024-02-16 00:30:50 +08:00
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
src = []
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_PIN'):
|
|
|
|
src += ['drv_pin.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_UART'):
|
|
|
|
src += ['drv_uart.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_RTC'):
|
|
|
|
src += ['drv_rtc.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_SPI'):
|
|
|
|
src += ['drv_spi.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_SDIO'):
|
|
|
|
src += ['drv_sdio.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_I2C'):
|
|
|
|
src += ['drv_i2c.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_ADC'):
|
|
|
|
src += ['drv_adc.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_HWTIMER'):
|
|
|
|
src += ['drv_hwtimer.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_WDT'):
|
|
|
|
src += ['drv_wdt.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_PWM'):
|
|
|
|
src += ['drv_pwm.c']
|
|
|
|
|
2024-07-31 18:25:19 +08:00
|
|
|
if GetDepend('BSP_USING_FLASH'):
|
|
|
|
src += ['drv_chipflash.c']
|
|
|
|
|
2024-02-16 00:30:50 +08:00
|
|
|
path = [cwd,cwd + '/config']
|
|
|
|
|
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
|
|
|
|
|
|
|
|
Return('group')
|