28 lines
499 B
Python
28 lines
499 B
Python
Import('RTT_ROOT')
|
|
Import('rtconfig')
|
|
from building import *
|
|
|
|
cwd = os.path.join(str(Dir('#')), 'drivers')
|
|
|
|
# add the general drivers.
|
|
src = Split("""
|
|
board.c
|
|
stm32l0xx_it.c
|
|
usart.c
|
|
""")
|
|
|
|
# add gpio drivers.
|
|
if GetDepend('RT_USING_PIN'):
|
|
src += ['gpio.c']
|
|
|
|
# add spi drivers.
|
|
if GetDepend('RT_USING_SPI'):
|
|
src += ['drv_spi.c']
|
|
|
|
CPPPATH = [cwd,
|
|
cwd + '../Drivers/CMSIS/Device/ST/STM32L0xx/Include']
|
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
Return('group')
|