Merged in f5soh/librepilot/update_credits (pull request #529)
[librepilot.git] / flight / pios / stm32f10x / libraries / STM32_USB-FS-Device_Driver / src / usb_init.c
blob1b2e562b958ad5aeb5cfc34b189821a3a37b1102
1 /******************** (C) COPYRIGHT 2010 STMicroelectronics ********************
2 * File Name : usb_init.c
3 * Author : MCD Application Team
4 * Version : V3.2.1
5 * Date : 07/05/2010
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 ------------------------------------------------------------------*/
17 #include "usb_lib.h"
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 */
24 uint8_t EPindex;
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 */
37 uint16_t SaveState ;
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
49 * Input : None.
50 * Output : None.
51 * Return : None.
52 *******************************************************************************/
53 void USB_Init(void)
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 */
60 pProperty->Init();
63 /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/