2015-01-19 14:18:16 +08:00
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
src = []
|
|
|
|
CPPPATH = [cwd + '/../include']
|
|
|
|
group = []
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_PIN']):
|
|
|
|
src = src + ['pin.c']
|
2018-11-19 19:04:44 +08:00
|
|
|
|
|
|
|
if GetDepend(['RT_USING_ADC']):
|
|
|
|
src = src + ['adc.c']
|
|
|
|
|
2018-06-07 21:23:22 +08:00
|
|
|
if GetDepend(['RT_USING_PWM']):
|
2018-06-08 16:07:12 +08:00
|
|
|
src = src + ['rt_drv_pwm.c']
|
2019-08-09 18:37:16 +08:00
|
|
|
|
|
|
|
if GetDepend(['RT_USING_ENCODER']):
|
|
|
|
src = src + ['encoder.c']
|
2018-06-07 21:23:22 +08:00
|
|
|
|
2015-01-19 14:18:16 +08:00
|
|
|
if len(src):
|
|
|
|
group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
Return('group')
|