2021-01-28 19:59:31 +08:00
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
2023-06-04 08:16:06 +08:00
|
|
|
src = []
|
2021-01-28 19:59:31 +08:00
|
|
|
CPPPATH = [cwd]
|
|
|
|
|
2023-06-04 08:16:06 +08:00
|
|
|
if GetDepend('BSP_USING_PIN'):
|
|
|
|
src += ['drv_gpio.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_UART'):
|
|
|
|
src += ['drv_uart.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_SOFT_I2C'):
|
|
|
|
src += ['drv_soft_i2c.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_SOFT_SPI'):
|
|
|
|
src += ['drv_soft_spi.c']
|
|
|
|
|
2023-06-05 15:52:31 +08:00
|
|
|
if GetDepend('BSP_USING_ADC'):
|
|
|
|
src += ['drv_adc.c']
|
|
|
|
|
2023-06-06 10:03:16 +08:00
|
|
|
if GetDepend('BSP_USING_WDT'):
|
|
|
|
src += ['drv_wdt.c']
|
|
|
|
|
2023-07-30 20:36:47 +08:00
|
|
|
if GetDepend('BSP_USING_SPI'):
|
|
|
|
src += ['drv_spi.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_I2C'):
|
|
|
|
src += ['drv_i2c.c']
|
|
|
|
|
2023-10-20 07:05:30 +08:00
|
|
|
if GetDepend('BSP_USING_ON_CHIP_FLASH'):
|
|
|
|
src += ['drv_flash.c']
|
|
|
|
|
2023-10-30 01:17:25 +08:00
|
|
|
if GetDepend('BSP_USING_PWM'):
|
|
|
|
src += ['drv_pwm.c']
|
|
|
|
|
2023-10-30 16:20:14 +08:00
|
|
|
if GetDepend('BSP_USING_HWTIMER'):
|
|
|
|
src += ['drv_hwtimer.c']
|
|
|
|
|
2024-01-16 14:01:19 +08:00
|
|
|
if GetDepend('BSP_USING_RTC'):
|
|
|
|
src += ['drv_rtc.c']
|
|
|
|
|
2021-01-28 19:59:31 +08:00
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
Return('group')
|