2023-02-25 10:47:04 +08:00
|
|
|
# RT-Thread building script for component
|
|
|
|
Import('RTT_ROOT')
|
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
# get current directory
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
# add the general drivers.
|
|
|
|
src = Split("""
|
|
|
|
""")
|
|
|
|
|
|
|
|
# The set of source files associated with this SConscript file.
|
2023-11-09 16:38:19 +08:00
|
|
|
if GetDepend('BSP_USING_USBOTG'):
|
2023-02-25 10:47:04 +08:00
|
|
|
src += ['src/usb_core.c']
|
|
|
|
|
|
|
|
if GetDepend('RT_USING_USB_DEVICE'):
|
2023-03-19 07:28:58 +08:00
|
|
|
src += ['src/usbd_core.c', 'src/usbd_int.c', 'src/usbd_sdr.c']
|
2023-02-25 10:47:04 +08:00
|
|
|
|
|
|
|
if GetDepend('RT_USING_USB_HOST'):
|
2023-03-19 07:28:58 +08:00
|
|
|
src += ['src/usbh_core.c', 'src/usbh_int.c', 'src/usbh_ctrl.c']
|
2023-02-25 10:47:04 +08:00
|
|
|
|
|
|
|
CPPPATH = [cwd + '/inc']
|
|
|
|
|
2023-11-09 16:38:19 +08:00
|
|
|
group = DefineGroup('usbotg_library', src, depend = [''], CPPPATH = CPPPATH)
|
2023-02-25 10:47:04 +08:00
|
|
|
|
|
|
|
Return('group')
|