2015-01-19 14:18:16 +08:00
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
2023-01-09 10:14:23 +08:00
|
|
|
src = []
|
2015-01-19 14:18:16 +08:00
|
|
|
CPPPATH = [cwd + '/../include']
|
|
|
|
group = []
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_PIN']):
|
|
|
|
src = src + ['pin.c']
|
2023-01-09 10:14:23 +08:00
|
|
|
|
2018-11-19 19:04:44 +08:00
|
|
|
if GetDepend(['RT_USING_ADC']):
|
|
|
|
src = src + ['adc.c']
|
2023-01-09 10:14:23 +08:00
|
|
|
|
2020-06-23 10:43:18 +08:00
|
|
|
if GetDepend(['RT_USING_DAC']):
|
|
|
|
src = src + ['dac.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']
|
2023-01-09 10:14:23 +08:00
|
|
|
|
2019-08-30 15:38:05 +08:00
|
|
|
if GetDepend(['RT_USING_PULSE_ENCODER']):
|
|
|
|
src = src + ['pulse_encoder.c']
|
2018-06-07 21:23:22 +08:00
|
|
|
|
2019-08-21 10:40:20 +08:00
|
|
|
if GetDepend(['RT_USING_INPUT_CAPTURE']):
|
|
|
|
src = src + ['rt_inputcapture.c']
|
2019-08-13 20:14:45 +08:00
|
|
|
|
2022-12-03 12:07:44 +08:00
|
|
|
if GetDepend(['RT_USING_NULL']):
|
|
|
|
src = src + ['rt_null.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_ZERO']):
|
|
|
|
src = src + ['rt_zero.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_RANDOM']):
|
|
|
|
src = src + ['rt_random.c']
|
|
|
|
|
2015-01-19 14:18:16 +08:00
|
|
|
if len(src):
|
|
|
|
group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
Return('group')
|