Merge branch 'tmaster' into future
[fw/stlink] / example / stm32f4 / STM32_USB_OTG_Driver / src / usb_bsp_template.c
diff --git a/example/stm32f4/STM32_USB_OTG_Driver/src/usb_bsp_template.c b/example/stm32f4/STM32_USB_OTG_Driver/src/usb_bsp_template.c
new file mode 100644 (file)
index 0000000..c3f515b
--- /dev/null
@@ -0,0 +1,200 @@
+/**
+  ******************************************************************************
+  * @file    usb_bsp.c
+  * @author  MCD Application Team
+  * @version V2.0.0
+  * @date    22-July-2011
+  * @brief   This file is responsible to offer board support package and is
+  *          configurable by user.
+  ******************************************************************************
+  * @attention
+  *
+  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
+  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
+  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
+  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
+  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+  *
+  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
+  ******************************************************************************
+  */ 
+
+/* Includes ------------------------------------------------------------------*/
+#include "usb_bsp.h"
+
+/** @addtogroup USB_OTG_DRIVER
+* @{
+*/
+
+/** @defgroup USB_BSP
+  * @brief This file is responsible to offer board support package
+  * @{
+  */ 
+
+/** @defgroup USB_BSP_Private_Defines
+  * @{
+  */ 
+/**
+  * @}
+  */ 
+
+
+/** @defgroup USB_BSP_Private_TypesDefinitions
+  * @{
+  */ 
+/**
+  * @}
+  */ 
+
+
+
+
+
+/** @defgroup USB_BSP_Private_Macros
+  * @{
+  */ 
+/**
+  * @}
+  */ 
+
+/** @defgroup USBH_BSP_Private_Variables
+  * @{
+  */ 
+
+/**
+  * @}
+  */ 
+
+/** @defgroup USBH_BSP_Private_FunctionPrototypes
+  * @{
+  */ 
+/**
+  * @}
+  */ 
+
+/** @defgroup USB_BSP_Private_Functions
+  * @{
+  */ 
+
+
+/**
+  * @brief  USB_OTG_BSP_Init
+  *         Initilizes BSP configurations
+  * @param  None
+  * @retval None
+  */
+
+void USB_OTG_BSP_Init(void)
+{
+
+}
+/**
+  * @brief  USB_OTG_BSP_EnableInterrupt
+  *         Enabele USB Global interrupt
+  * @param  None
+  * @retval None
+  */
+void USB_OTG_BSP_EnableInterrupt(void)
+{
+
+}
+
+/**
+  * @brief  BSP_Drive_VBUS
+  *         Drives the Vbus signal through IO
+  * @param  speed : Full, Low 
+  * @param  state : VBUS states
+  * @retval None
+  */
+
+void USB_OTG_BSP_DriveVBUS(uint32_t speed, uint8_t state)
+{
+
+}
+
+/**
+  * @brief  USB_OTG_BSP_ConfigVBUS
+  *         Configures the IO for the Vbus and OverCurrent
+  * @param  Speed : Full, Low 
+  * @retval None
+  */
+
+void  USB_OTG_BSP_ConfigVBUS(uint32_t speed)
+{
+
+}
+
+/**
+  * @brief  USB_OTG_BSP_TimeInit
+  *         Initialises delay unit Systick timer /Timer2
+  * @param  None
+  * @retval None
+  */
+void USB_OTG_BSP_TimeInit ( void )
+{
+
+}
+
+/**
+  * @brief  USB_OTG_BSP_uDelay
+  *         This function provides delay time in micro sec
+  * @param  usec : Value of delay required in micro sec
+  * @retval None
+  */
+void USB_OTG_BSP_uDelay (const uint32_t usec)
+{
+
+  uint32_t count = 0;
+  const uint32_t utime = (120 * usec / 7);
+  do
+  {
+    if ( ++count > utime )
+    {
+      return ;
+    }
+  }
+  while (1); 
+  
+}
+
+
+/**
+  * @brief  USB_OTG_BSP_mDelay
+  *          This function provides delay time in milli sec
+  * @param  msec : Value of delay required in milli sec
+  * @retval None
+  */
+void USB_OTG_BSP_mDelay (const uint32_t msec)
+{
+
+    USB_OTG_BSP_uDelay(msec * 1000);    
+
+}
+
+
+/**
+  * @brief  USB_OTG_BSP_TimerIRQ
+  *         Time base IRQ
+  * @param  None
+  * @retval None
+  */
+
+void USB_OTG_BSP_TimerIRQ (void)
+{
+
+} 
+
+/**
+* @}
+*/ 
+
+/**
+* @}
+*/ 
+
+/**
+* @}
+*/
+
+/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/