add static for usb_ep0_state to avoid duplicating
This commit is contained in:
@@ -2,10 +2,8 @@
|
|||||||
#include "usb_musb_reg.h"
|
#include "usb_musb_reg.h"
|
||||||
|
|
||||||
#ifdef CONFIG_USB_MUSB_SUNXI
|
#ifdef CONFIG_USB_MUSB_SUNXI
|
||||||
#define SUNXI_SRAMC_BASE 0x01c00000
|
|
||||||
#define SUNXI_USB0_BASE 0x01c13000
|
|
||||||
|
|
||||||
#define USBC_REG_o_PHYCTL 0x0404
|
#define SUNXI_USB0_BASE 0x01c13000
|
||||||
|
|
||||||
#ifndef USB_BASE
|
#ifndef USB_BASE
|
||||||
#define USB_BASE (SUNXI_USB0_BASE)
|
#define USB_BASE (SUNXI_USB0_BASE)
|
||||||
@@ -98,7 +96,7 @@ struct usb_dc_config_priv {
|
|||||||
struct usb_dc_ep_state out_ep[USB_NUM_BIDIR_ENDPOINTS]; /*!< OUT endpoint parameters */
|
struct usb_dc_ep_state out_ep[USB_NUM_BIDIR_ENDPOINTS]; /*!< OUT endpoint parameters */
|
||||||
} usb_dc_cfg;
|
} usb_dc_cfg;
|
||||||
|
|
||||||
volatile uint8_t usb_ep0_state = USB_EP0_STATE_SETUP;
|
static volatile uint8_t usb_ep0_state = USB_EP0_STATE_SETUP;
|
||||||
volatile uint16_t ep0_last_size = 0;
|
volatile uint16_t ep0_last_size = 0;
|
||||||
|
|
||||||
/* get current active ep */
|
/* get current active ep */
|
||||||
@@ -503,7 +501,7 @@ int usbd_ep_read(const uint8_t ep, uint8_t *data, uint32_t max_data_len, uint32_
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
uint8_t ep_idx = USB_EP_GET_IDX(ep);
|
uint8_t ep_idx = USB_EP_GET_IDX(ep);
|
||||||
uint32_t read_count;
|
uint32_t read_count = 0;
|
||||||
uint8_t old_ep_idx;
|
uint8_t old_ep_idx;
|
||||||
|
|
||||||
old_ep_idx = USBC_GetActiveEp();
|
old_ep_idx = USBC_GetActiveEp();
|
||||||
|
|||||||
@@ -3,11 +3,8 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_USB_MUSB_SUNXI
|
#ifdef CONFIG_USB_MUSB_SUNXI
|
||||||
|
|
||||||
#define SUNXI_SRAMC_BASE 0x01c00000
|
|
||||||
#define SUNXI_USB0_BASE 0x01c13000
|
#define SUNXI_USB0_BASE 0x01c13000
|
||||||
|
|
||||||
#define USBC_REG_o_PHYCTL 0x0404
|
|
||||||
|
|
||||||
#ifndef USB_BASE
|
#ifndef USB_BASE
|
||||||
#define USB_BASE (SUNXI_USB0_BASE)
|
#define USB_BASE (SUNXI_USB0_BASE)
|
||||||
#endif
|
#endif
|
||||||
@@ -131,7 +128,7 @@ struct usb_musb_priv {
|
|||||||
usb_osal_mutex_t exclsem[CONIFG_USB_MUSB_EP_NUM]; /* Support mutually exclusive access */
|
usb_osal_mutex_t exclsem[CONIFG_USB_MUSB_EP_NUM]; /* Support mutually exclusive access */
|
||||||
} g_usbhost;
|
} g_usbhost;
|
||||||
|
|
||||||
volatile uint8_t usb_ep0_state = USB_EP0_STATE_SETUP;
|
static volatile uint8_t usb_ep0_state = USB_EP0_STATE_SETUP;
|
||||||
volatile uint8_t ep0_outlen = 0;
|
volatile uint8_t ep0_outlen = 0;
|
||||||
|
|
||||||
/* get current active ep */
|
/* get current active ep */
|
||||||
|
|||||||
Reference in New Issue
Block a user