ARMEBS4  revision-26.06.2015
usb_dcd_int.h
1 #include "heivs/config.h"
2 #if (USE_STM32_USB_HOST_MODE || USE_STM32_USB_USE_DEVICE_MODE || USE_STM32_USB_OTG_MODE)
3 /**
4  ******************************************************************************
5  * @file usb_dcd_int.h
6  * @author MCD Application Team
7  * @version V2.1.0
8  * @date 19-March-2012
9  * @brief Peripheral Device Interface Layer
10  ******************************************************************************
11  * @attention
12  *
13  * <h2><center>&copy; COPYRIGHT 2012 STMicroelectronics</center></h2>
14  *
15  * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
16  * You may not use this file except in compliance with the License.
17  * You may obtain a copy of the License at:
18  *
19  * http://www.st.com/software_license_agreement_liberty_v2
20  *
21  * Unless required by applicable law or agreed to in writing, software
22  * distributed under the License is distributed on an "AS IS" BASIS,
23  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24  * See the License for the specific language governing permissions and
25  * limitations under the License.
26  *
27  ******************************************************************************
28  */
29 
30 /* Define to prevent recursive inclusion -------------------------------------*/
31 #ifndef USB_DCD_INT_H__
32 #define USB_DCD_INT_H__
33 
34 /* Includes ------------------------------------------------------------------*/
35 #include "stm32/usb/usb_dcd.h"
36 
37 
38 
39 /** @addtogroup USB_OTG_DRIVER
40  * @{
41  */
42 
43 /** @defgroup USB_DCD_INT
44  * @brief This file is the
45  * @{
46  */
47 
48 
49 /** @defgroup USB_DCD_INT_Exported_Defines
50  * @{
51  */
52 
53 typedef struct _USBD_DCD_INT
54 {
55  uint8_t (* DataOutStage) (USB_OTG_CORE_HANDLE *pdev , uint8_t epnum);
56  uint8_t (* DataInStage) (USB_OTG_CORE_HANDLE *pdev , uint8_t epnum);
57  uint8_t (* SetupStage) (USB_OTG_CORE_HANDLE *pdev);
58  uint8_t (* SOF) (USB_OTG_CORE_HANDLE *pdev);
59  uint8_t (* Reset) (USB_OTG_CORE_HANDLE *pdev);
60  uint8_t (* Suspend) (USB_OTG_CORE_HANDLE *pdev);
61  uint8_t (* Resume) (USB_OTG_CORE_HANDLE *pdev);
62  uint8_t (* IsoINIncomplete) (USB_OTG_CORE_HANDLE *pdev);
63  uint8_t (* IsoOUTIncomplete) (USB_OTG_CORE_HANDLE *pdev);
64 
65  uint8_t (* DevConnected) (USB_OTG_CORE_HANDLE *pdev);
66  uint8_t (* DevDisconnected) (USB_OTG_CORE_HANDLE *pdev);
67 
68 }USBD_DCD_INT_cb_TypeDef;
69 
70 extern USBD_DCD_INT_cb_TypeDef *USBD_DCD_INT_fops;
71 /**
72  * @}
73  */
74 
75 
76 /** @defgroup USB_DCD_INT_Exported_Types
77  * @{
78  */
79 /**
80  * @}
81  */
82 
83 /** @defgroup USB_DCD_INT_Exported_Macros
84  * @{
85  */
86 
87 #define CLEAR_IN_EP_INTR(epnum,intr) \
88  diepint.d32=0; \
89  diepint.b.intr = 1; \
90  USB_OTG_WRITE_REG32(&pdev->regs.INEP_REGS[epnum]->DIEPINT,diepint.d32);
91 
92 #define CLEAR_OUT_EP_INTR(epnum,intr) \
93  doepint.d32=0; \
94  doepint.b.intr = 1; \
95  USB_OTG_WRITE_REG32(&pdev->regs.OUTEP_REGS[epnum]->DOEPINT,doepint.d32);
96 
97 /**
98  * @}
99  */
100 
101 /** @defgroup USB_DCD_INT_Exported_Variables
102  * @{
103  */
104 /**
105  * @}
106  */
107 
108 /** @defgroup USB_DCD_INT_Exported_FunctionsPrototype
109  * @{
110  */
111 
112 uint32_t USBD_OTG_ISR_Handler (USB_OTG_CORE_HANDLE *pdev);
113 
114 /**
115  * @}
116  */
117 
118 
119 #endif // USB_DCD_INT_H__
120 
121 /**
122  * @}
123  */
124 
125 /**
126  * @}
127  */
128 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
129 #endif /* (USE_STM32_USB_HOST_MODE || USE_STM32_USB_USE_DEVICE_MODE || USE_STM32_USB_OTG_MODE) */
libheivs configuration file