usbh_usr.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /**
  2. ******************************************************************************
  3. * @file usbh_usr.h
  4. * @author MCD Application Team
  5. * @version V2.1.0
  6. * @date 19-March-2012
  7. * @brief Header file for usbh_usr.c
  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 __USH_USR_H__
  29. #define __USH_USR_H__
  30. /* Includes ------------------------------------------------------------------*/
  31. #include "ff.h"
  32. #include "usb_conf.h"
  33. #include "usbh_core.h"
  34. #include "usbh_msc_core.h"
  35. #include <stdio.h>
  36. /** @addtogroup USBH_USER
  37. * @{
  38. */
  39. /** @addtogroup USBH_MSC_DEMO_USER_CALLBACKS
  40. * @{
  41. */
  42. /** @defgroup USBH_USR
  43. * @brief This file is the Header file for usbh_usr.c
  44. * @{
  45. */
  46. /** @defgroup USBH_USR_Exported_Types
  47. * @{
  48. */
  49. extern USBH_Usr_cb_TypeDef USR_cb;
  50. /**
  51. * @}
  52. */
  53. /** @defgroup USBH_USR_Exported_Defines
  54. * @{
  55. */
  56. /* State Machine for the USBH_USR_ApplicationState */
  57. #define USH_USR_FS_INIT 0
  58. #define USH_USR_FS_READLIST 1
  59. #define USH_USR_FS_WRITEFILE 2
  60. #define USH_USR_FS_DRAW 3
  61. #define USH_USR_FS_TEST 4
  62. /**
  63. * @}
  64. */
  65. /** @defgroup USBH_USR_Exported_Macros
  66. * @{
  67. */
  68. /**
  69. * @}
  70. */
  71. /** @defgroup USBH_USR_Exported_Variables
  72. * @{
  73. */
  74. extern uint8_t USBH_USR_ApplicationState;
  75. /**
  76. * @}
  77. */
  78. /** @defgroup USBH_USR_Exported_FunctionsPrototype
  79. * @{
  80. */
  81. void USBH_USR_ApplicationSelected(void);
  82. void USBH_USR_Init(void);
  83. void USBH_USR_DeInit(void);
  84. void USBH_USR_DeviceAttached(void);
  85. void USBH_USR_ResetDevice(void);
  86. void USBH_USR_DeviceDisconnected(void);
  87. void USBH_USR_OverCurrentDetected(void);
  88. void USBH_USR_DeviceSpeedDetected(uint8_t DeviceSpeed);
  89. void USBH_USR_Device_DescAvailable(void *);
  90. void USBH_USR_DeviceAddressAssigned(void);
  91. void USBH_USR_Configuration_DescAvailable(USBH_CfgDesc_TypeDef *cfgDesc,
  92. USBH_InterfaceDesc_TypeDef *itfDesc,
  93. USBH_EpDesc_TypeDef *epDesc);
  94. void USBH_USR_Manufacturer_String(void *);
  95. void USBH_USR_Product_String(void *);
  96. void USBH_USR_SerialNum_String(void *);
  97. void USBH_USR_EnumerationDone(void);
  98. USBH_USR_Status USBH_USR_UserInput(void);
  99. void USBH_USR_DeInit(void);
  100. void USBH_USR_DeviceNotSupported(void);
  101. void USBH_USR_UnrecoveredError(void);
  102. int USBH_USR_MSC_Application(void);
  103. /**
  104. * @}
  105. */
  106. #endif /*__USH_USR_H__*/
  107. /**
  108. * @}
  109. */
  110. /**
  111. * @}
  112. */
  113. /**
  114. * @}
  115. */
  116. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/