1 /******************** (C) COPYRIGHT 2010 STMicroelectronics ********************
2 * File Name : usb_init.c
3 * Author : MCD Application Team
6 * Description : Initialization routines & global variables
7 ********************************************************************************
8 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
9 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
10 * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
11 * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
12 * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
13 * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
14 *******************************************************************************/
16 /* Includes ------------------------------------------------------------------*/
19 /* Private typedef -----------------------------------------------------------*/
20 /* Private define ------------------------------------------------------------*/
21 /* Private macro -------------------------------------------------------------*/
22 /* Private variables ---------------------------------------------------------*/
23 /* The number of current endpoint, it will be used to specify an endpoint */
25 /* The number of current device, it is an index to the Device_Table */
26 /* uint8_t Device_no; */
27 /* Points to the DEVICE_INFO structure of current device */
28 /* The purpose of this register is to speed up the execution */
29 DEVICE_INFO
*pInformation
;
30 /* Points to the DEVICE_PROP structure of current device */
31 /* The purpose of this register is to speed up the execution */
32 DEVICE_PROP
*pProperty
;
33 /* Temporary save the state of Rx & Tx status. */
34 /* Whenever the Rx or Tx state is changed, its value is saved */
35 /* in this variable first and will be set to the EPRB or EPRA */
36 /* at the end of interrupt process */
38 uint16_t wInterrupt_Mask
;
39 DEVICE_INFO Device_Info
;
40 USER_STANDARD_REQUESTS
*pUser_Standard_Requests
;
42 /* Extern variables ----------------------------------------------------------*/
43 /* Private function prototypes -----------------------------------------------*/
44 /* Private functions ---------------------------------------------------------*/
46 /*******************************************************************************
47 * Function Name : USB_Init
48 * Description : USB system initialization
52 *******************************************************************************/
55 pInformation
= &Device_Info
;
56 pInformation
->ControlState
= 2;
57 pProperty
= &Device_Property
;
58 pUser_Standard_Requests
= &User_Standard_Requests
;
59 /* Initialize devices one by one */
63 /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/