2019-10-24 17:56:09 +08:00
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
src = []
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_PIN'):
|
|
|
|
src += ['drv_pin.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_UART'):
|
|
|
|
src += ['drv_uart.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_RTC'):
|
|
|
|
src += ['drv_rtc.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_SPI'):
|
|
|
|
src += ['drv_spi.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_SDIO'):
|
2023-02-02 16:41:14 +08:00
|
|
|
src += ['drv_sdif.c']
|
2019-10-24 17:56:09 +08:00
|
|
|
|
|
|
|
if GetDepend('BSP_USING_I2C'):
|
|
|
|
src += ['drv_i2c.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_MMA8562I2C'):
|
|
|
|
src += ['drv_mma8562.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_ADC'):
|
2023-01-09 10:14:23 +08:00
|
|
|
src += ['drv_adc.c']
|
2019-10-24 17:56:09 +08:00
|
|
|
|
|
|
|
if GetDepend('BSP_USING_HWTIMER'):
|
2023-01-09 10:14:23 +08:00
|
|
|
src += ['drv_hwtimer.c']
|
2019-10-24 17:56:09 +08:00
|
|
|
|
|
|
|
if GetDepend('BSP_USING_WDT'):
|
2023-01-09 10:14:23 +08:00
|
|
|
src += ['drv_wdt.c']
|
2019-10-24 17:56:09 +08:00
|
|
|
|
|
|
|
if GetDepend('BSP_USING_PWM'):
|
|
|
|
src += ['drv_pwm.c']
|
|
|
|
|
2023-03-29 23:20:45 +08:00
|
|
|
if GetDepend('BSP_USING_I2S'):
|
|
|
|
src += ['drv_i2s.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_WM8904'):
|
|
|
|
src += ['drv_sound_wm8904.c']
|
|
|
|
|
2023-04-14 09:41:38 +08:00
|
|
|
if GetDepend('BSP_USING_SOFT_I2C'):
|
|
|
|
src += ['drv_soft_i2c.c']
|
2023-04-24 07:30:42 +08:00
|
|
|
|
|
|
|
if GetDepend('BSP_USING_SOFT_SPI'):
|
|
|
|
src += ['drv_soft_spi.c']
|
|
|
|
|
2023-05-31 11:40:19 +08:00
|
|
|
if GetDepend('BSP_USING_LCD'):
|
|
|
|
src += ['drv_st7796.c']
|
|
|
|
src += ['sample/lcd_sample.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_TOUCH'):
|
|
|
|
src += ['drv_gt911.c']
|
|
|
|
src += ['sample/touch_sample.c']
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_NXP_LCDM_S'):
|
|
|
|
src += ['sample/lcd_touch_sample.c']
|
|
|
|
|
|
|
|
path = [cwd]
|
2019-10-24 17:56:09 +08:00
|
|
|
|
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
|
|
|
|
|
|
|
|
Return('group')
|