diff options
| author | sakumisu <[email protected]> | 2022-04-15 21:38:58 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2022-04-15 21:38:58 +0800 |
| commit | fde5f93659d63d2e41bd42537c744fba87de33cc (patch) | |
| tree | 0f0cd66d8a88900e4f5a1da3cd40c27c1f348f42 | |
| parent | 5346788a50ec5c519734779b6df870be9f7b32c6 (diff) | |
rename USB_MUSB_SUNXI with CONFIG_USB_MUSB_SUNXI
| -rw-r--r-- | SConscript | 10 | ||||
| -rw-r--r-- | port/musb/usb_dc_musb.c | 6 | ||||
| -rw-r--r-- | port/musb/usb_hc_musb.c | 8 | ||||
| -rw-r--r-- | port/musb/usb_musb_reg.h | 4 |
4 files changed, 14 insertions, 14 deletions
@@ -40,7 +40,7 @@ if GetDepend(['PKG_CHERRYUSB_DEVICE']): if GetDepend(['PKG_CHERRYUSB_USING_HUB']): path += [cwd + '/class/hub'] src += Glob('class/hub/usbd_hub.c') - + if GetDepend(['PKG_CHERRYUSB_DEVICE_CDC_TEMPLATE']): src += Glob('demo/cdc_acm_template.c') if GetDepend(['PKG_CHERRYUSB_DEVICE_HID_MOUSE_TEMPLATE']): @@ -55,7 +55,7 @@ if GetDepend(['PKG_CHERRYUSB_DEVICE']): src += Glob('demo/audio_v2_mic_speaker_multichan_template.c') if GetDepend(['PKG_CHERRYUSB_DEVICE_VIDEO_TEMPLATE']): src += Glob('demo/video_hs_mjpeg_template.c') - + if GetDepend(['PKG_CHERRYUSB_DEVICE_FSDEV_STM32']): src += Glob('port/fsdev/usb_dc_fsdev.c') if GetDepend(['PKG_CHERRYUSB_DEVICE_SYNOPSYS_STM32']): @@ -63,7 +63,7 @@ if GetDepend(['PKG_CHERRYUSB_DEVICE']): if GetDepend(['PKG_CHERRYUSB_DEVICE_MUSB']): src += Glob('port/musb/usb_dc_musb.c') if GetDepend(['PKG_CHERRYUSB_DEVICE_MUSB_SUNXI']): - CPPDEFINES += ['USB_MUSB_SUNXI'] + CPPDEFINES += ['CONFIG_USB_MUSB_SUNXI'] # USB HOST if GetDepend(['PKG_CHERRYUSB_USING_HOST']): @@ -71,7 +71,7 @@ if GetDepend(['PKG_CHERRYUSB_USING_HOST']): path += [cwd + '/osal'] src += Glob('osal/usb_osal_rtthread.c') src += Glob('osal/usb_workq.c') - + if GetDepend(['PKG_CHERRYUSB_HOST_CDC']): path += [cwd + '/class/cdc'] src += Glob('class/cdc/usbh_cdc_acm.c') @@ -91,7 +91,7 @@ if GetDepend(['PKG_CHERRYUSB_USING_HOST']): if GetDepend(['PKG_CHERRYUSB_HOST_MUSB']): src += Glob('port/musb/usb_hc_musb.c') if GetDepend(['PKG_CHERRYUSB_HOST_MUSB_SUNXI']): - CPPDEFINES += ['USB_MUSB_SUNXI'] + CPPDEFINES += ['CONFIG_USB_MUSB_SUNXI'] if GetDepend(['PKG_CHERRYUSB_HOST_TEMPLATE']): src += Glob('demo/usb_host.c') diff --git a/port/musb/usb_dc_musb.c b/port/musb/usb_dc_musb.c index 4fa388da..4c3439af 100644 --- a/port/musb/usb_dc_musb.c +++ b/port/musb/usb_dc_musb.c @@ -1,7 +1,7 @@ #include "usbd_core.h" #include "usb_musb_reg.h" -#ifdef USB_MUSB_SUNXI +#ifdef CONFIG_USB_MUSB_SUNXI #define SUNXI_SRAMC_BASE 0x01c00000 #define SUNXI_USB0_BASE 0x01c13000 @@ -45,7 +45,7 @@ void USBD_IRQHandler(int, void *); #define MUSB_IND_RXCOUNT_OFFSET 0x18 #define MUSB_FIFO_OFFSET 0x20 -#endif // USB_MUSB_SUNXI +#endif // CONFIG_USB_MUSB_SUNXI #ifndef USB_NUM_BIDIR_ENDPOINTS #define USB_NUM_BIDIR_ENDPOINTS 8 @@ -631,7 +631,7 @@ static void handle_ep0(void) } } -#ifdef USB_MUSB_SUNXI +#ifdef CONFIG_USB_MUSB_SUNXI void USBD_IRQHandler(int irq, void *args) #else void USBD_IRQHandler(void) diff --git a/port/musb/usb_hc_musb.c b/port/musb/usb_hc_musb.c index cc60bc3b..720e166a 100644 --- a/port/musb/usb_hc_musb.c +++ b/port/musb/usb_hc_musb.c @@ -1,7 +1,7 @@ #include "usbh_core.h" #include "usb_musb_reg.h" -#ifdef USB_MUSB_SUNXI +#ifdef CONFIG_USB_MUSB_SUNXI #define SUNXI_SRAMC_BASE 0x01c00000 #define SUNXI_USB0_BASE 0x01c13000 @@ -74,7 +74,7 @@ void USBH_IRQHandler(int, void *); #define USB_TXINTERVALx_BASE (USB_BASE + MUSB_IND_TXINTERVAL_OFFSET) #define USB_RXINTERVALx_BASE (USB_BASE + MUSB_IND_RXINTERVAL_OFFSET) -#ifdef USB_MUSB_SUNXI +#ifdef CONFIG_USB_MUSB_SUNXI #define USB_TXADDR_BASE(ep_idx) (&USB->TXFUNCADDR0) #define USB_TXHUBADDR_BASE(ep_idx) (&USB->TXHUBADDR0) #define USB_TXHUBPORT_BASE(ep_idx) (&USB->TXHUBPORT0) @@ -477,7 +477,7 @@ int usb_hc_init(void) USB->POWER |= USB_POWER_HSENAB; USB->DEVCTL |= USB_DEVCTL_SESSION; -#ifdef USB_MUSB_SUNXI +#ifdef CONFIG_USB_MUSB_SUNXI USB->CSRL0 = USB_CSRL0_TXRDY; #endif return 0; @@ -1097,7 +1097,7 @@ chan_wait: usb_musb_chan_wakeup(chan); } -#ifdef USB_MUSB_SUNXI +#ifdef CONFIG_USB_MUSB_SUNXI void USBH_IRQHandler(int irq, void *arg) #else void USBH_IRQHandler(void) diff --git a/port/musb/usb_musb_reg.h b/port/musb/usb_musb_reg.h index 60b194de..4460be65 100644 --- a/port/musb/usb_musb_reg.h +++ b/port/musb/usb_musb_reg.h @@ -8,7 +8,7 @@ /** * @brief Register map for USB0 peripheral (USB0) */ -#ifdef USB_MUSB_SUNXI +#ifdef CONFIG_USB_MUSB_SUNXI typedef __PACKED_STRUCT { /*!< USB0 Structure */ union { @@ -466,7 +466,7 @@ typedef struct { /*!< USB0 Structure __IO uint32_t CC; /*!< USB Clock Configuration */ } USB0_Type; -#endif // USB_MUSB_SUNXI +#endif // CONFIG_USB_MUSB_SUNXI //***************************************************************************** // |
