forked from yystopf/xiuos
51 lines
1.0 KiB
Python
51 lines
1.0 KiB
Python
import os
|
|
import rtconfig
|
|
from building import *
|
|
|
|
cwd = GetCurrentDir()
|
|
drv_path = cwd+"/../../../rt-thread/bsp/k210/driver/"
|
|
src = [
|
|
'board.c',
|
|
'heap.c',
|
|
drv_path + 'drv_uart.c',
|
|
'drv_interrupt.c',
|
|
'drv_io_config.c',
|
|
'dmalock.c'
|
|
]
|
|
CPPPATH = [cwd,drv_path]
|
|
|
|
if GetDepend('RT_USING_PIN'):
|
|
src += ['drv_gpio.c']
|
|
|
|
if GetDepend('RT_USING_HWTIMER'):
|
|
src += [drv_path + 'drv_hw_timer.c']
|
|
|
|
if GetDepend('RT_USING_I2C'):
|
|
src += [drv_path + 'drv_i2c.c']
|
|
|
|
if GetDepend('RT_USING_SPI'):
|
|
src += ['drv_spi.c']
|
|
|
|
if GetDepend('RT_USING_PWM'):
|
|
src += [drv_path + 'drv_pwm.c']
|
|
|
|
if GetDepend('RT_USING_WDT'):
|
|
src += [drv_path + 'drv_wdt.c']
|
|
|
|
if GetDepend('BSP_USING_SDCARD'):
|
|
src += ['sdcard_port.c']
|
|
|
|
if GetDepend('BSP_USING_DVP'):
|
|
src += ['drv_dvp.c']
|
|
|
|
if GetDepend('BSP_USING_LCD'):
|
|
src += ['drv_lcd.c']
|
|
src += ['drv_mpylcd.c']
|
|
|
|
if GetDepend('PKG_USING_RW007'):
|
|
src += ['rw007_port.c']
|
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
Return('group')
|