diff --git a/SConscript b/SConscript index c3deda77..c4998332 100644 --- a/SConscript +++ b/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') diff --git a/port/musb/usb_glue_sunxi.c b/port/musb/usb_glue_sunxi.c new file mode 100644 index 00000000..c30681bf --- /dev/null +++ b/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 \ No newline at end of file