2022-05-06 09:28:21 +08:00
|
|
|
Import('RTT_ROOT')
|
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
# add the general drivers.
|
|
|
|
src = Split("""
|
|
|
|
drv_irq.c
|
|
|
|
""")
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_PIN']):
|
|
|
|
src += ['drv_gpio.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_SERIAL']):
|
|
|
|
src += ['drv_usart.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_SPI']):
|
|
|
|
src += ['drv_spi.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_I2C', 'RT_USING_I2C_BITOPS']):
|
|
|
|
src += ['drv_soft_i2c.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_ETH', 'RT_USING_LWIP']):
|
|
|
|
src += ['drv_eth.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_ADC']):
|
|
|
|
src += ['drv_adc.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_CAN']):
|
|
|
|
src += ['drv_can.c']
|
2023-01-09 10:14:23 +08:00
|
|
|
|
2022-06-15 10:38:35 +08:00
|
|
|
if GetDepend(['RT_USING_RTC']):
|
|
|
|
src += ['drv_rtc.c']
|
2023-01-09 10:14:23 +08:00
|
|
|
|
2022-08-03 10:46:35 +08:00
|
|
|
if GetDepend(['RT_USING_WDT']):
|
|
|
|
src += ['drv_wdt.c']
|
2022-05-06 09:28:21 +08:00
|
|
|
|
2022-06-29 00:00:58 +08:00
|
|
|
if GetDepend(['RT_USING_PWM', 'BSP_USING_PWM_TMRA']):
|
|
|
|
src += ['drv_pwm_tmra.c']
|
|
|
|
|
2022-05-06 09:28:21 +08:00
|
|
|
path = [cwd]
|
|
|
|
|
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
|
|
|
|
|
|
|
|
Return('group')
|