2 ******************************************************************************
4 * @author MCD Application Team
6 * @date 19-September-2011
7 * @brief This file includes the user application layer
8 ******************************************************************************
11 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 * <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2>
19 ******************************************************************************
22 /* Includes ------------------------------------------------------------------*/
24 #include "usbd_ioreq.h"
27 /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
31 /** @defgroup USBD_USR
32 * @brief This file includes the user application layer
36 /** @defgroup USBD_USR_Private_TypesDefinitions
44 /** @defgroup USBD_USR_Private_Defines
52 /** @defgroup USBD_USR_Private_Macros
60 /** @defgroup USBD_USR_Private_Variables
64 USBD_Usr_cb_TypeDef USR_cb =
68 USBD_USR_DeviceConfigured,
69 USBD_USR_DeviceSuspended,
70 USBD_USR_DeviceResumed,
72 USBD_USR_DeviceConnected,
73 USBD_USR_DeviceDisconnected,
84 /** @defgroup USBD_USR_Private_Constants
94 /** @defgroup USBD_USR_Private_FunctionPrototypes
102 /** @defgroup USBD_USR_Private_Functions
107 * @brief USBD_USR_Init
108 * Displays the message on LCD for host lib initialization
112 void USBD_USR_Init(void)
114 /* Setup SysTick Timer for 40 msec interrupts
115 This interrupt is used to probe the joystick */
116 if (SysTick_Config(SystemCoreClock / 24))
124 * @brief USBD_USR_DeviceReset
125 * Displays the message on LCD on device Reset Event
126 * @param speed : device speed
129 void USBD_USR_DeviceReset(uint8_t speed )
133 case USB_OTG_SPEED_HIGH:
136 case USB_OTG_SPEED_FULL:
146 * @brief USBD_USR_DeviceConfigured
147 * Displays the message on LCD on device configuration Event
151 void USBD_USR_DeviceConfigured (void)
157 * @brief USBD_USR_DeviceConnected
158 * Displays the message on LCD on device connection Event
162 void USBD_USR_DeviceConnected (void)
168 * @brief USBD_USR_DeviceDisonnected
169 * Displays the message on LCD on device disconnection Event
173 void USBD_USR_DeviceDisconnected (void)
178 * @brief USBD_USR_DeviceSuspended
179 * Displays the message on LCD on device suspend Event
183 void USBD_USR_DeviceSuspended(void)
185 /* Users can do their application actions here for the USB-Reset */
190 * @brief USBD_USR_DeviceResumed
191 * Displays the message on LCD on device resume Event
195 void USBD_USR_DeviceResumed(void)
197 /* Users can do their application actions here for the USB-Reset */
208 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/