2 ******************************************************************************
4 * @author MCD Application Team
7 * @brief Peripheral Driver Header file
8 ******************************************************************************
11 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 * <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2>
19 ******************************************************************************
22 /* Define to prevent recursive inclusion -------------------------------------*/
26 /* Includes ------------------------------------------------------------------*/
30 /** @addtogroup USB_OTG_DRIVER
35 * @brief This file is the
40 /** @defgroup USB_DCD_Exported_Defines
43 #define USB_OTG_EP_CONTROL 0
44 #define USB_OTG_EP_ISOC 1
45 #define USB_OTG_EP_BULK 2
46 #define USB_OTG_EP_INT 3
47 #define USB_OTG_EP_MASK 3
50 #define USB_OTG_DEFAULT 1
51 #define USB_OTG_ADDRESSED 2
52 #define USB_OTG_CONFIGURED 3
53 #define USB_OTG_SUSPENDED 4
60 /** @defgroup USB_DCD_Exported_Types
63 /********************************************************************************
65 ********************************************************************************/
69 uint8_t bDescriptorType;
70 uint8_t bEndpointAddress;
72 uint16_t wMaxPacketSize;
75 EP_DESCRIPTOR , *PEP_DESCRIPTOR;
82 /** @defgroup USB_DCD_Exported_Macros
89 /** @defgroup USB_DCD_Exported_Variables
96 /** @defgroup USB_DCD_Exported_FunctionsPrototype
99 /********************************************************************************
100 EXPORTED FUNCTION FROM THE USB-OTG LAYER
101 ********************************************************************************/
102 void DCD_Init(USB_OTG_CORE_HANDLE *pdev ,
103 USB_OTG_CORE_ID_TypeDef coreID);
105 void DCD_DevConnect (USB_OTG_CORE_HANDLE *pdev);
106 void DCD_DevDisconnect (USB_OTG_CORE_HANDLE *pdev);
107 void DCD_EP_SetAddress (USB_OTG_CORE_HANDLE *pdev,
109 uint32_t DCD_EP_Open(USB_OTG_CORE_HANDLE *pdev ,
114 uint32_t DCD_EP_Close (USB_OTG_CORE_HANDLE *pdev,
118 uint32_t DCD_EP_PrepareRx ( USB_OTG_CORE_HANDLE *pdev,
123 uint32_t DCD_EP_Tx (USB_OTG_CORE_HANDLE *pdev,
127 uint32_t DCD_EP_Stall (USB_OTG_CORE_HANDLE *pdev,
129 uint32_t DCD_EP_ClrStall (USB_OTG_CORE_HANDLE *pdev,
131 uint32_t DCD_EP_Flush (USB_OTG_CORE_HANDLE *pdev,
133 uint32_t DCD_Handle_ISR(USB_OTG_CORE_HANDLE *pdev);
135 uint32_t DCD_GetEPStatus(USB_OTG_CORE_HANDLE *pdev ,
138 void DCD_SetEPStatus (USB_OTG_CORE_HANDLE *pdev ,
157 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/