2 ******************************************************************************
4 * @author MCD Application Team
6 * @date 09-November-2015
7 * @brief This file is responsible to offer board support package and is
8 * configurable by user.
9 ******************************************************************************
12 * <h2><center>© COPYRIGHT 2015 STMicroelectronics</center></h2>
14 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
15 * You may not use this file except in compliance with the License.
16 * You may obtain a copy of the License at:
18 * http://www.st.com/software_license_agreement_liberty_v2
20 * Unless required by applicable law or agreed to in writing, software
21 * distributed under the License is distributed on an "AS IS" BASIS,
22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 * See the License for the specific language governing permissions and
24 * limitations under the License.
26 ******************************************************************************
29 /* Includes ------------------------------------------------------------------*/
32 /** @addtogroup USB_OTG_DRIVER
37 * @brief This file is responsible to offer board support package
41 /** @defgroup USB_BSP_Private_Defines
49 /** @defgroup USB_BSP_Private_TypesDefinitions
60 /** @defgroup USB_BSP_Private_Macros
67 /** @defgroup USBH_BSP_Private_Variables
75 /** @defgroup USBH_BSP_Private_FunctionPrototypes
82 /** @defgroup USB_BSP_Private_Functions
88 * @brief USB_OTG_BSP_Init
89 * Initializes BSP configurations
94 void USB_OTG_BSP_Init(void)
99 * @brief USB_OTG_BSP_EnableInterrupt
100 * Enable USB Global interrupt
104 void USB_OTG_BSP_EnableInterrupt(void)
110 * @brief BSP_Drive_VBUS
111 * Drives the Vbus signal through IO
112 * @param speed : Full, Low
113 * @param state : VBUS states
117 void USB_OTG_BSP_DriveVBUS(uint32_t speed
, uint8_t state
)
125 * @brief USB_OTG_BSP_ConfigVBUS
126 * Configures the IO for the Vbus and OverCurrent
127 * @param Speed : Full, Low
131 void USB_OTG_BSP_ConfigVBUS(uint32_t speed
)
138 * @brief USB_OTG_BSP_TimeInit
139 * Initialises delay unit Systick timer /Timer2
143 void USB_OTG_BSP_TimeInit ( void )
149 * @brief USB_OTG_BSP_uDelay
150 * This function provides delay time in micro sec
151 * @param usec : Value of delay required in micro sec
154 void USB_OTG_BSP_uDelay (const uint32_t usec
)
158 const uint32_t utime
= (120 * usec
/ 7);
161 if ( ++count
> utime
)
172 * @brief USB_OTG_BSP_mDelay
173 * This function provides delay time in milli sec
174 * @param msec : Value of delay required in milli sec
177 void USB_OTG_BSP_mDelay (const uint32_t msec
)
180 USB_OTG_BSP_uDelay(msec
* 1000);
186 * @brief USB_OTG_BSP_TimerIRQ
192 void USB_OTG_BSP_TimerIRQ (void)
209 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/