2013-01-08 22:40:58 +08:00
|
|
|
Import('RTT_ROOT')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
src = Split("""
|
2020-05-15 09:46:01 +08:00
|
|
|
core/usbdevice_core.c
|
2013-01-08 22:40:58 +08:00
|
|
|
core/usbdevice.c
|
|
|
|
""")
|
|
|
|
|
|
|
|
if GetDepend('RT_USB_DEVICE_CDC'):
|
2023-01-09 10:14:23 +08:00
|
|
|
src += Glob('class/cdc_vcom.c')
|
|
|
|
|
2017-11-11 10:51:47 +08:00
|
|
|
if GetDepend('RT_USB_DEVICE_HID'):
|
|
|
|
src += Glob('class/hid.c')
|
2013-01-08 22:40:58 +08:00
|
|
|
|
|
|
|
if GetDepend('RT_USB_DEVICE_MSTORAGE'):
|
2023-01-09 10:14:23 +08:00
|
|
|
src += Glob('class/mstorage.c')
|
2013-01-08 22:40:58 +08:00
|
|
|
|
2017-11-21 22:37:22 +08:00
|
|
|
if GetDepend('RT_USB_DEVICE_ECM'):
|
2023-01-09 10:14:23 +08:00
|
|
|
src += Glob('class/ecm.c')
|
2017-11-21 22:37:22 +08:00
|
|
|
|
2017-11-24 22:57:22 +08:00
|
|
|
if GetDepend('RT_USB_DEVICE_RNDIS'):
|
2023-01-09 10:14:23 +08:00
|
|
|
src += Glob('class/rndis.c')
|
2017-11-24 22:57:22 +08:00
|
|
|
|
2017-11-23 00:37:21 +08:00
|
|
|
if GetDepend('RT_USB_DEVICE_WINUSB'):
|
2023-01-09 10:14:23 +08:00
|
|
|
src += Glob('class/winusb.c')
|
|
|
|
|
2019-09-19 21:00:05 +08:00
|
|
|
if GetDepend('RT_USB_DEVICE_AUDIO_MIC'):
|
2023-01-09 10:14:23 +08:00
|
|
|
src += Glob('class/audio_mic.c')
|
2019-09-19 21:00:05 +08:00
|
|
|
|
|
|
|
if GetDepend('RT_USB_DEVICE_AUDIO_SPEAKER'):
|
2023-01-09 10:14:23 +08:00
|
|
|
src += Glob('class/audio_speaker.c')
|
2017-11-23 00:37:21 +08:00
|
|
|
|
2013-01-08 22:40:58 +08:00
|
|
|
CPPPATH = [cwd]
|
|
|
|
|
2017-11-11 10:51:47 +08:00
|
|
|
group = DefineGroup('rt_usbd', src, depend = ['RT_USING_USB_DEVICE'], CPPPATH = CPPPATH)
|
2013-01-08 22:40:58 +08:00
|
|
|
|
|
|
|
Return('group')
|