2 ******************************************************************************
4 * @author MCD Application Team
7 * @brief This file is responsible to offer board support package and is
8 * configurable by user.
9 ******************************************************************************
12 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
14 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
15 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
16 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
17 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
19 * <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2>
20 ******************************************************************************
23 /* Includes ------------------------------------------------------------------*/
26 /** @addtogroup USB_OTG_DRIVER
31 * @brief This file is responsible to offer board support package
35 /** @defgroup USB_BSP_Private_Defines
43 /** @defgroup USB_BSP_Private_TypesDefinitions
54 /** @defgroup USB_BSP_Private_Macros
61 /** @defgroup USBH_BSP_Private_Variables
69 /** @defgroup USBH_BSP_Private_FunctionPrototypes
76 /** @defgroup USB_BSP_Private_Functions
82 * @brief USB_OTG_BSP_Init
83 * Initilizes BSP configurations
88 void USB_OTG_BSP_Init(void)
93 * @brief USB_OTG_BSP_EnableInterrupt
94 * Enabele USB Global interrupt
98 void USB_OTG_BSP_EnableInterrupt(void)
104 * @brief BSP_Drive_VBUS
105 * Drives the Vbus signal through IO
106 * @param speed : Full, Low
107 * @param state : VBUS states
111 void USB_OTG_BSP_DriveVBUS(uint32_t speed, uint8_t state)
117 * @brief USB_OTG_BSP_ConfigVBUS
118 * Configures the IO for the Vbus and OverCurrent
119 * @param Speed : Full, Low
123 void USB_OTG_BSP_ConfigVBUS(uint32_t speed)
129 * @brief USB_OTG_BSP_TimeInit
130 * Initialises delay unit Systick timer /Timer2
134 void USB_OTG_BSP_TimeInit ( void )
140 * @brief USB_OTG_BSP_uDelay
141 * This function provides delay time in micro sec
142 * @param usec : Value of delay required in micro sec
145 void USB_OTG_BSP_uDelay (const uint32_t usec)
149 const uint32_t utime = (120 * usec / 7);
152 if ( ++count > utime )
163 * @brief USB_OTG_BSP_mDelay
164 * This function provides delay time in milli sec
165 * @param msec : Value of delay required in milli sec
168 void USB_OTG_BSP_mDelay (const uint32_t msec)
171 USB_OTG_BSP_uDelay(msec * 1000);
177 * @brief USB_OTG_BSP_TimerIRQ
183 void USB_OTG_BSP_TimerIRQ (void)
200 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/