2014-01-02 18:30:13 +08:00
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
2019-03-08 15:02:46 +08:00
|
|
|
CPPPATH = [cwd]
|
2014-01-02 18:30:13 +08:00
|
|
|
|
2019-03-08 15:02:46 +08:00
|
|
|
# add the general drivers.
|
|
|
|
src = Split("""
|
|
|
|
board.c
|
|
|
|
""")
|
2014-01-02 18:30:13 +08:00
|
|
|
|
2019-03-08 15:02:46 +08:00
|
|
|
if GetDepend(['BSP_USING_EMAC']):
|
|
|
|
src += ['drv_emac.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_HWTIMER0']):
|
|
|
|
src += ['drv_hwtimer.c']
|
2023-01-09 10:14:23 +08:00
|
|
|
|
2019-03-08 15:02:46 +08:00
|
|
|
if GetDepend(['BSP_USING_LED']):
|
|
|
|
src += ['drv_led.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_SDRAM']):
|
|
|
|
src += ['drv_sdram.c']
|
2023-01-09 10:14:23 +08:00
|
|
|
|
2019-03-08 15:02:46 +08:00
|
|
|
if GetDepend('BSP_USING_UART0') or GetDepend('BSP_USING_UART2'):
|
|
|
|
src += ['drv_uart.c']
|
2014-01-02 18:30:13 +08:00
|
|
|
|
2021-09-17 18:19:23 +08:00
|
|
|
if GetDepend('BSP_USING_ADC'):
|
|
|
|
src += ['drv_adc.c']
|
|
|
|
|
2014-01-02 18:30:13 +08:00
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
Return('group')
|