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']
|
2022-05-19 14:06:35 +08:00
|
|
|
|
|
|
|
if GetDepend('BSP_USING_LPADC'):
|
|
|
|
src += ['drv_lpadc.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']
|
2020-10-12 18:15:01 +08:00
|
|
|
|
|
|
|
if GetDepend('BSP_USING_PHY'):
|
|
|
|
src += ['drv_mdio.c']
|
2019-09-19 10:11:57 +08:00
|
|
|
|
2020-01-14 16:09:11 +08:00
|
|
|
if GetDepend('BSP_USING_AUDIO'):
|
|
|
|
src += ['drv_sai.c']
|
|
|
|
src += ['bsp_wm8960.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_SDIO'):
|
|
|
|
src += ['drv_sdio.c']
|
2021-02-23 09:44:27 +08:00
|
|
|
|
|
|
|
if GetDepend('BSP_USING_USB_DEVICE'):
|
2019-12-26 14:10:06 +08:00
|
|
|
src += ['drv_usbd.c']
|
|
|
|
src += Glob('usb/device/*.c')
|
|
|
|
|
2022-01-26 11:49:22 +08:00
|
|
|
if GetDepend('BSP_USING_USB_DEVICE') or GetDepend('RT_USING_USB_HOST'):
|
2019-12-26 14:10:06 +08:00
|
|
|
src += Glob('usb/phy/*.c')
|
2022-01-26 11:49:22 +08:00
|
|
|
CPPDEFINES += ['ENDIANNESS','USE_RTOS']
|
2020-10-26 15:51:03 +08:00
|
|
|
|
2022-01-26 11:49:22 +08:00
|
|
|
if GetDepend('RT_USING_USB_HOST'):
|
|
|
|
src += ['drv_usbh.c']
|
|
|
|
src += Glob('usb/host/*.c')
|
|
|
|
|
2022-01-24 14:22:48 +08:00
|
|
|
if GetDepend('BSP_USING_PULSE_ENCODER'):
|
|
|
|
src += ['drv_pulse_encoder.c']
|
|
|
|
|
2022-03-14 22:54:12 +08:00
|
|
|
path = [cwd]
|
2019-06-12 15:01:12 +08:00
|
|
|
|
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')
|
2022-05-19 14:06:35 +08:00
|
|
|
|