2013-01-08 22:40:58 +08:00
|
|
|
from building import *
|
|
|
|
|
2021-06-05 17:21:27 +08:00
|
|
|
cwd = GetCurrentDir()
|
2013-01-08 22:40:58 +08:00
|
|
|
CPPPATH = [cwd + '/../include']
|
2021-06-16 16:55:33 +08:00
|
|
|
group = []
|
2024-03-01 10:29:21 +08:00
|
|
|
src = []
|
|
|
|
|
|
|
|
if not GetDepend(['RT_USING_SERIAL']):
|
|
|
|
Return('group')
|
|
|
|
|
2024-03-28 23:42:56 +08:00
|
|
|
if GetDepend(['RT_USING_SMART']):
|
|
|
|
src += Glob('serial_tty.c')
|
|
|
|
|
2024-03-01 10:29:21 +08:00
|
|
|
if GetDepend(['RT_USING_SERIAL_V2']):
|
2024-09-14 05:40:40 +08:00
|
|
|
src += ['dev_serial_v2.c']
|
2024-03-01 10:29:21 +08:00
|
|
|
else:
|
2024-09-14 05:40:40 +08:00
|
|
|
src += ['dev_serial.c']
|
2024-03-01 10:29:21 +08:00
|
|
|
|
|
|
|
if GetDepend(['RT_USING_DM']):
|
|
|
|
src += ['serial_dm.c']
|
|
|
|
|
|
|
|
group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH)
|
2013-01-08 22:40:58 +08:00
|
|
|
|
|
|
|
Return('group')
|