2022-09-14 15:49:05 +08:00
|
|
|
import os
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
2023-11-30 00:21:12 +08:00
|
|
|
src = ['board.c']
|
2022-09-14 15:49:05 +08:00
|
|
|
|
|
|
|
CPPPATH = [cwd]
|
|
|
|
|
2023-11-30 00:21:12 +08:00
|
|
|
if GetDepend('BSP_USING_GPIO'):
|
|
|
|
src += ['drv_gpio.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_UART'):
|
|
|
|
src += ['drv_uart.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_ADC'):
|
|
|
|
src += ['drv_adc.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_I2C'):
|
|
|
|
src += ['drv_hw_i2c.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_PWM'):
|
|
|
|
src += ['drv_pwm.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_HWTIMER'):
|
|
|
|
src += ['drv_hwtimer.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_WIFI'):
|
|
|
|
src += ['drv_wifi.c']
|
|
|
|
|
2024-10-09 06:34:24 +08:00
|
|
|
if GetDepend('BSP_USING_SPI'):
|
|
|
|
src += ['drv_spi.c']
|
|
|
|
|
2022-09-14 15:49:05 +08:00
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
Return('group')
|