2019-06-12 15:01:12 +08:00
|
|
|
from building import *
|
|
|
|
|
|
|
|
src = []
|
2019-12-26 14:10:06 +08:00
|
|
|
cwd = []
|
|
|
|
CPPDEFINES = []
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
2019-06-12 15:01:12 +08:00
|
|
|
|
|
|
|
if GetDepend('BSP_USING_GPIO'):
|
|
|
|
src += ['drv_gpio.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_LPUART'):
|
|
|
|
src += ['drv_uart.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_HWTIMER'):
|
|
|
|
src += ['drv_hwtimer.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_RTC'):
|
|
|
|
src += ['drv_rtc.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_SPI'):
|
|
|
|
src += ['drv_spi.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_I2C'):
|
|
|
|
src += ['drv_i2c.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_WDT'):
|
|
|
|
src += ['drv_wdt.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_PWM'):
|
|
|
|
src += ['drv_pwm.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_ADC'):
|
|
|
|
src += ['drv_adc.c']
|
|
|
|
|
2019-06-28 14:02:20 +08:00
|
|
|
if GetDepend('BSP_USING_CAN'):
|
|
|
|
src += ['drv_can.c']
|
|
|
|
|
2019-06-12 15:01:12 +08:00
|
|
|
if GetDepend('BSP_USING_SDRAM'):
|
|
|
|
src += ['drv_sdram.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_LCD'):
|
|
|
|
src += ['drv_lcd.c']
|
|
|
|
|
2019-09-19 10:11:57 +08:00
|
|
|
if GetDepend('BSP_USING_ETH'):
|
|
|
|
src += ['drv_eth.c']
|
|
|
|
|
2019-12-26 14:10:06 +08:00
|
|
|
if GetDepend('BSP_USING_USB_DEVICE'):
|
|
|
|
src += ['drv_usbd.c']
|
|
|
|
src += Glob('usb/device/*.c')
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_USB_DEVICE'):
|
|
|
|
src += Glob('usb/phy/*.c')
|
|
|
|
CPPDEFINES += ['ENDIANNESS']
|
|
|
|
|
2019-06-12 15:01:12 +08:00
|
|
|
path = [cwd,cwd + '/config']
|
|
|
|
|
2019-12-26 14:10:06 +08:00
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES=CPPDEFINES)
|
2019-06-12 15:01:12 +08:00
|
|
|
|
|
|
|
Return('group')
|