mirror of
https://gitee.com/Vancouver2017/luban-lite-t3e-pro.git
synced 2025-12-14 10:28:54 +00:00
v1.0.3
This commit is contained in:
57
packages/third-party/cherryusb/SConscript
vendored
57
packages/third-party/cherryusb/SConscript
vendored
@@ -18,7 +18,14 @@ CPPDEFINES = []
|
||||
|
||||
# USB DEVICE
|
||||
if GetDepend(['LPKG_CHERRYUSB_DEVICE']) and GetDepend(['AIC_USB_DEVICE_DRV']):
|
||||
path += [cwd + '/osal']
|
||||
src += Glob('core/usbd_core.c')
|
||||
if PRJ_KERNEL == 'rt-thread':
|
||||
src += Glob('osal/usb_osal_rtthread.c')
|
||||
elif PRJ_KERNEL == 'freertos':
|
||||
src += Glob('osal/usb_osal_freertos.c')
|
||||
elif PRJ_KERNEL == 'baremetal':
|
||||
src += Glob('osal/usb_osal_baremetal.c')
|
||||
|
||||
if GetDepend(['LPKG_CHERRYUSB_DEVICE_HS']):
|
||||
CPPDEFINES+=['CONFIG_USB_HS']
|
||||
@@ -29,8 +36,6 @@ if GetDepend(['LPKG_CHERRYUSB_DEVICE']) and GetDepend(['AIC_USB_DEVICE_DRV']):
|
||||
src += Glob('class/hid/usbd_hid.c')
|
||||
if GetDepend(['LPKG_CHERRYUSB_DEVICE_MSC']):
|
||||
src += Glob('class/msc/usbd_msc.c')
|
||||
if GetDepend(['LPKG_CHERRYUSB_EXMAPLE']):
|
||||
src += Glob('example/usbd_msc_ramdisk.c')
|
||||
if GetDepend(['LPKG_CHERRYUSB_DEVICE_AUDIO']):
|
||||
src += Glob('class/audio/usbd_audio.c')
|
||||
if GetDepend(['LPKG_CHERRYUSB_DEVICE_VIDEO']):
|
||||
@@ -46,8 +51,12 @@ if GetDepend(['LPKG_CHERRYUSB_DEVICE']) and GetDepend(['AIC_USB_DEVICE_DRV']):
|
||||
src += Glob('demo/hid_mouse_template.c')
|
||||
if GetDepend(['LPKG_CHERRYUSB_DEVICE_HID_KEYBOARD_TEMPLATE']):
|
||||
src += Glob('demo/hid_keyboard_template.c')
|
||||
if GetDepend(['LPKG_CHERRYUSB_DEVICE_HID_IO_TEMPLATE']):
|
||||
src += Glob('demo/hid_custom_inout_template.c')
|
||||
if GetDepend(['LPKG_CHERRYUSB_DEVICE_MSC_TEMPLATE']):
|
||||
src += Glob('demo/msc_ram_template.c')
|
||||
if GetDepend(['LPKG_CHERRYUSB_DEVICE_MSC_STORAGE_TEMPLATE']):
|
||||
src += Glob('demo/msc_storage_template.c')
|
||||
if GetDepend(['LPKG_CHERRYUSB_DEVICE_AUDIO_V1_TEMPLATE']):
|
||||
src += Glob('demo/audio_v1_mic_speaker_multichan_template.c')
|
||||
if GetDepend(['LPKG_CHERRYUSB_DEVICE_AUDIO_V2_TEMPLATE']):
|
||||
@@ -66,14 +75,8 @@ if GetDepend(['LPKG_CHERRYUSB_DEVICE']) and GetDepend(['AIC_USB_DEVICE_DRV']):
|
||||
|
||||
if GetDepend(['LPKG_CHERRYUSB_DEVICE_DWC2']):
|
||||
src += Glob('port/dwc2/usb_dc_dwc2.c')
|
||||
if GetDepend(['LPKG_CHERRYUSB_DEVICE_DWC2_PORT_FS']):
|
||||
CPPDEFINES += ['CONFIG_USB_DWC2_PORT=FS_PORT']
|
||||
elif GetDepend(['LPKG_CHERRYUSB_DEVICE_DWC2_PORT_HS']):
|
||||
CPPDEFINES += ['CONFIG_USB_DWC2_PORT=HS_PORT']
|
||||
if GetDepend(['SOC_SERIES_STM32F7']):
|
||||
CPPDEFINES += ['STM32F7']
|
||||
elif GetDepend(['SOC_SERIES_STM32H7']):
|
||||
CPPDEFINES += ['STM32H7']
|
||||
if GetDepend(['LPKG_CHERRYUSB_DEVICE_DWC2_STM32']):
|
||||
src += Glob('port/dwc2/usb_glue_st.c')
|
||||
|
||||
if GetDepend(['LPKG_CHERRYUSB_DEVICE_MUSB']):
|
||||
src += Glob('port/musb/usb_dc_musb.c')
|
||||
@@ -89,6 +92,12 @@ if GetDepend(['LPKG_CHERRYUSB_DEVICE']) and GetDepend(['AIC_USB_DEVICE_DRV']):
|
||||
else:
|
||||
src += Glob('port/ch32/usb_dc_usbfs.c')
|
||||
|
||||
if GetDepend(['LPKG_CHERRYUSB_DEVICE_PUSB2']):
|
||||
path += [cwd + '/port/pusb2/common']
|
||||
path += [cwd + '/port/pusb2/fpusb2']
|
||||
src += Glob('port/pusb2/fpusb2' + '/*.c')
|
||||
src += Glob('port/pusb2/usb_dc_pusb2.c')
|
||||
|
||||
# USB HOST
|
||||
if GetDepend(['LPKG_CHERRYUSB_HOST']) and GetDepend(['AIC_USB_HOST_EHCI_DRV']):
|
||||
path += [cwd + '/osal']
|
||||
@@ -99,6 +108,8 @@ if GetDepend(['LPKG_CHERRYUSB_HOST']) and GetDepend(['AIC_USB_HOST_EHCI_DRV']):
|
||||
src += Glob('osal/usb_osal_rtthread.c')
|
||||
elif PRJ_KERNEL == 'freertos':
|
||||
src += Glob('osal/usb_osal_freertos.c')
|
||||
elif PRJ_KERNEL == 'baremetal':
|
||||
src += Glob('osal/usb_osal_baremetal.c')
|
||||
|
||||
if GetDepend(['LPKG_CHERRYUSB_HOST_CDC']):
|
||||
src += Glob('class/cdc/usbh_cdc_acm.c')
|
||||
@@ -106,13 +117,17 @@ if GetDepend(['LPKG_CHERRYUSB_HOST']) and GetDepend(['AIC_USB_HOST_EHCI_DRV']):
|
||||
src += Glob('class/hid/usbh_hid.c')
|
||||
if GetDepend(['LPKG_CHERRYUSB_HOST_MSC']):
|
||||
src += Glob('class/msc/usbh_msc.c')
|
||||
if GetDepend(['LPKG_CHERRYUSB_EXMAPLE']):
|
||||
src += Glob('example/usbh_msc.c')
|
||||
if GetDepend(['LPKG_CHERRYUSB_HOST_RNDIS']):
|
||||
src += Glob('class/wireless/usbh_rndis.c')
|
||||
if GetDepend(['LPKG_CHERRYUSB_HOST_CDC_ECM']):
|
||||
src += Glob('class/cdc/usbh_cdc_ecm.c')
|
||||
if GetDepend(['LPKG_CHERRYUSB_HOST_BLUETOOTH']):
|
||||
src += Glob('class/wireless/usbh_bluetooth.c')
|
||||
|
||||
if GetDepend(['LPKG_CHERRYUSB_HOST_DWC2']):
|
||||
src += Glob('port/dwc2/usb_hc_dwc2.c')
|
||||
if GetDepend(['LPKG_CHERRYUSB_HOST_DWC2_STM32']):
|
||||
src += Glob('port/dwc2/usb_glue_st.c')
|
||||
|
||||
if GetDepend(['LPKG_CHERRYUSB_HOST_MUSB']):
|
||||
src += Glob('port/musb/usb_hc_musb.c')
|
||||
@@ -126,13 +141,21 @@ if GetDepend(['LPKG_CHERRYUSB_HOST']) and GetDepend(['AIC_USB_HOST_EHCI_DRV']):
|
||||
if GetDepend(['LPKG_CHERRYUSB_HOST_EHCI_HPM']):
|
||||
src += Glob('port/ehci/usb_glue_hpm.c')
|
||||
|
||||
if GetDepend(['LPKG_CHERRYUSB_HOST_XHCI']):
|
||||
src += Glob('port/xhci/usb_hc_xhci.c')
|
||||
src += Glob('port/xhci/xhci_dbg.c')
|
||||
src += Glob('port/xhci/xhci.c')
|
||||
|
||||
if GetDepend(['LPKG_CHERRYUSB_HOST_PUSB2']):
|
||||
path += [cwd + '/port/pusb2/common']
|
||||
path += [cwd + '/port/pusb2/fpusb2']
|
||||
src += Glob('port/pusb2/fpusb2' + '/*.c')
|
||||
src += Glob('port/pusb2/usb_hc_pusb2.c')
|
||||
|
||||
if GetDepend(['LPKG_CHERRYUSB_HOST_TEMPLATE']):
|
||||
src += Glob('demo/usb_host.c')
|
||||
|
||||
if GetDepend(['LPKG_CHERRYUSB_HOST_CP210X']):
|
||||
path += [cwd + '/class/vendor/cp201x']
|
||||
src += Glob('class/vendor/cp201x/usbh_cp210x.c')
|
||||
src += Glob('third_party/rt-thread-4.1.1/dfs/drv_usbh_cp210x_rtt.c')
|
||||
if GetDepend(['LPKG_CHERRYUSB_HOST_MSC_TEMPLATE']):
|
||||
src += Glob('demo/usbh_msc_template.c')
|
||||
|
||||
group = DefineGroup('CherryUSB', src, depend = ['LPKG_USING_CHERRYUSB'], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user