Bläddra i källkod

update(port/musb): add sunxi glue for check

sakumisu 1 år sedan
förälder
incheckning
60747ce435
2 ändrade filer med 7 tillägg och 2 borttagningar
  1. 2 2
      SConscript
  2. 5 0
      port/musb/usb_glue_sunxi.c

+ 2 - 2
SConscript

@@ -46,7 +46,7 @@ if GetDepend(['PKG_CHERRYUSB_DEVICE']):
         src += Glob('port/musb/usb_dc_musb.c')
     if GetDepend(['PKG_CHERRYUSB_DEVICE_MUSB_SUNXI']):
         src += Glob('port/musb/usb_dc_musb.c')
-        CPPDEFINES += ['CONFIG_USB_MUSB_SUNXI']
+        src += Glob('port/musb/usb_glue_sunxi.c')
     if GetDepend(['PKG_CHERRYUSB_DEVICE_MUSB_CUSTOM']):
         src += Glob('port/musb/usb_dc_musb.c')
     if GetDepend(['PKG_CHERRYUSB_DEVICE_BL']):
@@ -153,7 +153,7 @@ if GetDepend(['PKG_CHERRYUSB_HOST']):
         src += Glob('port/musb/usb_hc_musb.c')
     if GetDepend(['PKG_CHERRYUSB_HOST_MUSB_SUNXI']):
         src += Glob('port/musb/usb_hc_musb.c')
-        CPPDEFINES += ['CONFIG_USB_MUSB_SUNXI']
+        src += Glob('port/musb/usb_glue_sunxi.c')
     if GetDepend(['PKG_CHERRYUSB_HOST_MUSB_CUSTOM']):
         src += Glob('port/musb/usb_hc_musb.c')
 

+ 5 - 0
port/musb/usb_glue_sunxi.c

@@ -0,0 +1,5 @@
+#include "usb_config.h"
+
+#ifndef CONFIG_USB_MUSB_SUNXI
+#error must define CONFIG_USB_MUSB_SUNXI when use sunxi chips
+#endif