2019-03-31 15:44:24 +08:00
|
|
|
from building import *
|
|
|
|
|
2019-04-07 00:53:39 +08:00
|
|
|
cwd = GetCurrentDir()
|
2019-03-31 15:44:24 +08:00
|
|
|
|
|
|
|
# add the general drivers.
|
|
|
|
src = Split("""
|
|
|
|
board.c
|
|
|
|
drv_usart.c
|
|
|
|
""")
|
|
|
|
|
|
|
|
CPPPATH = [cwd]
|
|
|
|
|
|
|
|
# add spi drivers.
|
|
|
|
if GetDepend('RT_USING_SPI'):
|
|
|
|
src += ['drv_spi.c']
|
2023-01-09 10:14:23 +08:00
|
|
|
|
2019-03-31 15:44:24 +08:00
|
|
|
# add i2c drivers.
|
|
|
|
if GetDepend('RT_USING_I2C'):
|
|
|
|
src += ['drv_i2c.c']
|
|
|
|
|
|
|
|
# add pin drivers.
|
|
|
|
if GetDepend('RT_USING_PIN'):
|
|
|
|
src += ['drv_gpio.c']
|
|
|
|
|
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
Return('group')
|