Merge pull request #11189 from klutvott123/move-telemetry-displayport-init
[betaflight.git] / lib / main / STM32_USB-FS-Device_Driver / src / usb_init.c
blob0949620ad5fd1fa508ee96242db5c6d6b64aa738
1 /**
2 ******************************************************************************
3 * @file usb_init.c
4 * @author MCD Application Team
5 * @version V4.0.0
6 * @date 28-August-2012
7 * @brief Initialization routines & global variables
8 ******************************************************************************
9 * @attention
11 * <h2><center>&copy; COPYRIGHT 2012 STMicroelectronics</center></h2>
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:
17 * http://www.st.com/software_license_agreement_liberty_v2
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.
25 ******************************************************************************
29 /* Includes ------------------------------------------------------------------*/
30 #include "usb_lib.h"
32 /* Private typedef -----------------------------------------------------------*/
33 /* Private define ------------------------------------------------------------*/
34 /* Private macro -------------------------------------------------------------*/
35 /* Private variables ---------------------------------------------------------*/
36 /* The number of current endpoint, it will be used to specify an endpoint */
37 uint8_t EPindex;
38 /* The number of current device, it is an index to the Device_Table */
39 /* uint8_t Device_no; */
40 /* Points to the DEVICE_INFO structure of current device */
41 /* The purpose of this register is to speed up the execution */
42 DEVICE_INFO *pInformation;
43 /* Points to the DEVICE_PROP structure of current device */
44 /* The purpose of this register is to speed up the execution */
45 DEVICE_PROP *pProperty;
46 /* Temporary save the state of Rx & Tx status. */
47 /* Whenever the Rx or Tx state is changed, its value is saved */
48 /* in this variable first and will be set to the EPRB or EPRA */
49 /* at the end of interrupt process */
50 uint16_t SaveState ;
51 uint16_t wInterrupt_Mask;
52 DEVICE_INFO Device_Info;
53 USER_STANDARD_REQUESTS *pUser_Standard_Requests;
55 /* Extern variables ----------------------------------------------------------*/
56 /* Private function prototypes -----------------------------------------------*/
57 /* Private functions ---------------------------------------------------------*/
59 /*******************************************************************************
60 * Function Name : USB_Init
61 * Description : USB system initialization
62 * Input : None.
63 * Output : None.
64 * Return : None.
65 *******************************************************************************/
66 void USB_Init(void)
68 pInformation = &Device_Info;
69 pInformation->ControlState = 2;
70 pProperty = &Device_Property;
71 pUser_Standard_Requests = &User_Standard_Requests;
72 /* Initialize devices one by one */
73 pProperty->Init();
76 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/