rename USB_MUSB_SUNXI with CONFIG_USB_MUSB_SUNXI

This commit is contained in:
sakumisu
2022-04-15 21:38:58 +08:00
parent 5346788a50
commit fde5f93659
4 changed files with 14 additions and 14 deletions

View File

@@ -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')

View File

@@ -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)

View File

@@ -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)

View File

@@ -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
//*****************************************************************************
//