2 ******************************************************************************
4 * @author MCD Application Team
6 * @date 09-November-2015
7 * @brief Peripheral Device Interface Layer
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 -------------------------------------*/
29 #ifndef USB_DCD_INT_H__
30 #define USB_DCD_INT_H__
32 /* Includes ------------------------------------------------------------------*/
37 /** @addtogroup USB_OTG_DRIVER
41 /** @defgroup USB_DCD_INT
42 * @brief This file is the
47 /** @defgroup USB_DCD_INT_Exported_Defines
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
;
74 /** @defgroup USB_DCD_INT_Exported_Types
81 /** @defgroup USB_DCD_INT_Exported_Macros
85 #define CLEAR_IN_EP_INTR(epnum,intr) \
88 USB_OTG_WRITE_REG32(&pdev->regs.INEP_REGS[epnum]->DIEPINT,diepint.d32);
90 #define CLEAR_OUT_EP_INTR(epnum,intr) \
93 USB_OTG_WRITE_REG32(&pdev->regs.OUTEP_REGS[(epnum)]->DOEPINT,doepint.d32);
99 /** @defgroup USB_DCD_INT_Exported_Variables
106 /** @defgroup USB_DCD_INT_Exported_FunctionsPrototype
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
);
118 #endif /* USB_DCD_INT_H__ */
127 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/