2 ******************************************************************************
4 * @author MCD Application Team
6 * @date 09-November-2015
7 * @brief Peripheral Driver Header file
8 ******************************************************************************
11 * <h2><center>© COPYRIGHT 2015 STMicroelectronics</center></h2>
13 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 * You may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at:
17 * http://www.st.com/software_license_agreement_liberty_v2
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
25 ******************************************************************************
28 /* Define to prevent recursive inclusion -------------------------------------*/
32 /* Includes ------------------------------------------------------------------*/
36 /** @addtogroup USB_OTG_DRIVER
41 * @brief This file is the
46 /** @defgroup USB_DCD_Exported_Defines
49 #define USB_OTG_EP_CONTROL 0
50 #define USB_OTG_EP_ISOC 1
51 #define USB_OTG_EP_BULK 2
52 #define USB_OTG_EP_INT 3
53 #define USB_OTG_EP_MASK 3
56 #define USB_OTG_DEFAULT 1
57 #define USB_OTG_ADDRESSED 2
58 #define USB_OTG_CONFIGURED 3
59 #define USB_OTG_SUSPENDED 4
66 /** @defgroup USB_DCD_Exported_Types
69 /********************************************************************************
71 ********************************************************************************/
75 uint8_t bDescriptorType
;
76 uint8_t bEndpointAddress
;
78 uint16_t wMaxPacketSize
;
81 EP_DESCRIPTOR
, *PEP_DESCRIPTOR
;
88 /** @defgroup USB_DCD_Exported_Macros
95 /** @defgroup USB_DCD_Exported_Variables
102 /** @defgroup USB_DCD_Exported_FunctionsPrototype
105 /********************************************************************************
106 EXPORTED FUNCTION FROM THE USB-OTG LAYER
107 ********************************************************************************/
108 void DCD_Init(USB_OTG_CORE_HANDLE
*pdev
,
109 USB_OTG_CORE_ID_TypeDef coreID
);
111 void DCD_DevConnect (USB_OTG_CORE_HANDLE
*pdev
);
112 void DCD_DevDisconnect (USB_OTG_CORE_HANDLE
*pdev
);
113 void DCD_EP_SetAddress (USB_OTG_CORE_HANDLE
*pdev
,
115 uint32_t DCD_EP_Open(USB_OTG_CORE_HANDLE
*pdev
,
120 uint32_t DCD_EP_Close (USB_OTG_CORE_HANDLE
*pdev
,
124 uint32_t DCD_EP_PrepareRx ( USB_OTG_CORE_HANDLE
*pdev
,
129 uint32_t DCD_EP_Tx (USB_OTG_CORE_HANDLE
*pdev
,
133 uint32_t DCD_EP_Stall (USB_OTG_CORE_HANDLE
*pdev
,
135 uint32_t DCD_EP_ClrStall (USB_OTG_CORE_HANDLE
*pdev
,
137 uint32_t DCD_EP_Flush (USB_OTG_CORE_HANDLE
*pdev
,
139 uint32_t DCD_Handle_ISR(USB_OTG_CORE_HANDLE
*pdev
);
141 uint32_t DCD_GetEPStatus(USB_OTG_CORE_HANDLE
*pdev
,
144 void DCD_SetEPStatus (USB_OTG_CORE_HANDLE
*pdev
,
153 #endif /* __DCD_H__ */
163 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/