usb_dcd_int.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /**
  2. ******************************************************************************
  3. * @file usb_dcd_int.h
  4. * @author MCD Application Team
  5. * @version V2.1.0
  6. * @date 19-March-2012
  7. * @brief Peripheral Device Interface Layer
  8. ******************************************************************************
  9. * @attention
  10. *
  11. * <h2><center>&copy; COPYRIGHT 2012 STMicroelectronics</center></h2>
  12. *
  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:
  16. *
  17. * http://www.st.com/software_license_agreement_liberty_v2
  18. *
  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.
  24. *
  25. ******************************************************************************
  26. */
  27. /* Define to prevent recursive inclusion -------------------------------------*/
  28. #ifndef USB_DCD_INT_H__
  29. #define USB_DCD_INT_H__
  30. /* Includes ------------------------------------------------------------------*/
  31. #include "usb_dcd.h"
  32. /** @addtogroup USB_OTG_DRIVER
  33. * @{
  34. */
  35. /** @defgroup USB_DCD_INT
  36. * @brief This file is the
  37. * @{
  38. */
  39. /** @defgroup USB_DCD_INT_Exported_Defines
  40. * @{
  41. */
  42. typedef struct _USBD_DCD_INT
  43. {
  44. uint8_t (* DataOutStage) (USB_OTG_CORE_HANDLE *pdev , uint8_t epnum);
  45. uint8_t (* DataInStage) (USB_OTG_CORE_HANDLE *pdev , uint8_t epnum);
  46. uint8_t (* SetupStage) (USB_OTG_CORE_HANDLE *pdev);
  47. uint8_t (* SOF) (USB_OTG_CORE_HANDLE *pdev);
  48. uint8_t (* Reset) (USB_OTG_CORE_HANDLE *pdev);
  49. uint8_t (* Suspend) (USB_OTG_CORE_HANDLE *pdev);
  50. uint8_t (* Resume) (USB_OTG_CORE_HANDLE *pdev);
  51. uint8_t (* IsoINIncomplete) (USB_OTG_CORE_HANDLE *pdev);
  52. uint8_t (* IsoOUTIncomplete) (USB_OTG_CORE_HANDLE *pdev);
  53. uint8_t (* DevConnected) (USB_OTG_CORE_HANDLE *pdev);
  54. uint8_t (* DevDisconnected) (USB_OTG_CORE_HANDLE *pdev);
  55. }USBD_DCD_INT_cb_TypeDef;
  56. extern USBD_DCD_INT_cb_TypeDef *USBD_DCD_INT_fops;
  57. /**
  58. * @}
  59. */
  60. /** @defgroup USB_DCD_INT_Exported_Types
  61. * @{
  62. */
  63. /**
  64. * @}
  65. */
  66. /** @defgroup USB_DCD_INT_Exported_Macros
  67. * @{
  68. */
  69. #define CLEAR_IN_EP_INTR(epnum,intr) \
  70. diepint.d32=0; \
  71. diepint.b.intr = 1; \
  72. USB_OTG_WRITE_REG32(&pdev->regs.INEP_REGS[epnum]->DIEPINT,diepint.d32);
  73. #define CLEAR_OUT_EP_INTR(epnum,intr) \
  74. doepint.d32=0; \
  75. doepint.b.intr = 1; \
  76. USB_OTG_WRITE_REG32(&pdev->regs.OUTEP_REGS[epnum]->DOEPINT,doepint.d32);
  77. /**
  78. * @}
  79. */
  80. /** @defgroup USB_DCD_INT_Exported_Variables
  81. * @{
  82. */
  83. /**
  84. * @}
  85. */
  86. /** @defgroup USB_DCD_INT_Exported_FunctionsPrototype
  87. * @{
  88. */
  89. uint32_t USBD_OTG_ISR_Handler (USB_OTG_CORE_HANDLE *pdev);
  90. /**
  91. * @}
  92. */
  93. #endif // USB_DCD_INT_H__
  94. /**
  95. * @}
  96. */
  97. /**
  98. * @}
  99. */
  100. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/