Merge pull request #11270 from haslinghuis/rename_attr
[betaflight.git] / lib / main / STM32_USB_OTG_Driver / inc / usb_dcd_int.h
blobcd942e2b219993105de91503d725895b3a6fd377
1 /**
2 ******************************************************************************
3 * @file usb_dcd_int.h
4 * @author MCD Application Team
5 * @version V2.2.0
6 * @date 09-November-2015
7 * @brief Peripheral Device Interface Layer
8 ******************************************************************************
9 * @attention
11 * <h2><center>&copy; 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 -------------------------------------*/
29 #ifndef USB_DCD_INT_H__
30 #define USB_DCD_INT_H__
32 /* Includes ------------------------------------------------------------------*/
33 #include "usb_dcd.h"
37 /** @addtogroup USB_OTG_DRIVER
38 * @{
41 /** @defgroup USB_DCD_INT
42 * @brief This file is the
43 * @{
44 */
47 /** @defgroup USB_DCD_INT_Exported_Defines
48 * @{
49 */
51 typedef struct _USBD_DCD_INT
53 uint8_t (* DataOutStage) (USB_OTG_CORE_HANDLE *pdev , uint8_t epnum);
54 uint8_t (* DataInStage) (USB_OTG_CORE_HANDLE *pdev , uint8_t epnum);
55 uint8_t (* SetupStage) (USB_OTG_CORE_HANDLE *pdev);
56 uint8_t (* SOF) (USB_OTG_CORE_HANDLE *pdev);
57 uint8_t (* Reset) (USB_OTG_CORE_HANDLE *pdev);
58 uint8_t (* Suspend) (USB_OTG_CORE_HANDLE *pdev);
59 uint8_t (* Resume) (USB_OTG_CORE_HANDLE *pdev);
60 uint8_t (* IsoINIncomplete) (USB_OTG_CORE_HANDLE *pdev);
61 uint8_t (* IsoOUTIncomplete) (USB_OTG_CORE_HANDLE *pdev);
63 uint8_t (* DevConnected) (USB_OTG_CORE_HANDLE *pdev);
64 uint8_t (* DevDisconnected) (USB_OTG_CORE_HANDLE *pdev);
66 } USBD_DCD_INT_cb_TypeDef;
68 extern USBD_DCD_INT_cb_TypeDef *USBD_DCD_INT_fops;
69 /**
70 * @}
71 */
74 /** @defgroup USB_DCD_INT_Exported_Types
75 * @{
76 */
77 /**
78 * @}
79 */
81 /** @defgroup USB_DCD_INT_Exported_Macros
82 * @{
83 */
85 #define CLEAR_IN_EP_INTR(epnum,intr) \
86 diepint.d32=0; \
87 diepint.b.intr = 1; \
88 USB_OTG_WRITE_REG32(&pdev->regs.INEP_REGS[epnum]->DIEPINT,diepint.d32);
90 #define CLEAR_OUT_EP_INTR(epnum,intr) \
91 doepint.d32=0; \
92 doepint.b.intr = 1; \
93 USB_OTG_WRITE_REG32(&pdev->regs.OUTEP_REGS[(epnum)]->DOEPINT,doepint.d32);
95 /**
96 * @}
97 */
99 /** @defgroup USB_DCD_INT_Exported_Variables
100 * @{
103 * @}
106 /** @defgroup USB_DCD_INT_Exported_FunctionsPrototype
107 * @{
110 uint32_t USBD_OTG_ISR_Handler (USB_OTG_CORE_HANDLE *pdev);
111 uint32_t USBD_OTG_EP1OUT_ISR_Handler (USB_OTG_CORE_HANDLE *pdev);
112 uint32_t USBD_OTG_EP1IN_ISR_Handler (USB_OTG_CORE_HANDLE *pdev);
114 * @}
118 #endif /* USB_DCD_INT_H__ */
121 * @}
125 * @}
127 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/