rt-thread/bsp/cypress/libraries/HAL_Drivers/SConscript

65 lines
1.3 KiB
Python
Raw Normal View History

Import('RTT_ROOT')
Import('rtconfig')
from building import *
cwd = GetCurrentDir()
# add the general drivers.
src = Split("""
drv_common.c
""")
if GetDepend(['RT_USING_PIN']):
src += ['drv_gpio.c']
if GetDepend(['RT_USING_SERIAL']):
if GetDepend(['RT_USING_SERIAL_V2']):
src += ['drv_usart_v2.c']
else:
src += ['drv_uart.c']
if GetDepend(['RT_USING_I2C', 'RT_USING_I2C_BITOPS']):
2022-07-08 17:07:28 +08:00
if GetDepend('BSP_USING_I2C1'):
src += ['drv_soft_i2c.c']
2022-07-08 17:07:28 +08:00
if GetDepend(['RT_USING_I2C']):
2022-07-11 11:17:03 +08:00
if GetDepend('BSP_USING_HW_I2C3') or GetDepend('BSP_USING_HW_I2C6'):
2022-07-08 17:07:28 +08:00
src += ['drv_i2c.c']
2022-07-22 10:22:21 +08:00
if GetDepend(['BSP_USING_SDIO1']):
src += Glob('drv_sdio.c')
if GetDepend(['BSP_USING_PWM']):
2022-07-18 11:43:07 +08:00
src += ['drv_pwm.c']
2022-07-22 10:22:21 +08:00
if GetDepend(['BSP_USING_SPI']):
2022-07-20 12:39:42 +08:00
src += ['drv_spi.c']
2022-07-22 10:22:21 +08:00
if GetDepend(['BSP_USING_ADC']):
2022-07-05 16:59:20 +08:00
src += ['drv_adc.c']
if GetDepend(['BSP_USING_USBD']):
src += ['drv_usbd.c']
2022-07-26 12:52:25 +08:00
if GetDepend('BSP_USING_RTC'):
src += ['drv_rtc.c']
2022-07-27 15:41:25 +08:00
if GetDepend('BSP_USING_ON_CHIP_FLASH'):
src += ['drv_flash.c']
2022-07-22 10:22:21 +08:00
if GetDepend(['RT_USING_WDT']):
src += ['drv_wdt.c']
if GetDepend(['RT_USING_DAC']):
src += ['drv_dac.c']
2022-08-10 00:18:48 +08:00
if GetDepend(['BSP_USING_TIM']):
src += ['drv_hwtimer.c']
2022-07-08 17:07:28 +08:00
path = [cwd]
path += [cwd + '/config']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
Return('group')