#include "usb_bsp.h"
#include "stm32f4_discovery.h"
| #define HOST_OVRCURR_EXTI_LINE EXTI_Line5 |
| #define HOST_OVRCURR_IRQn EXTI9_5_IRQn |
| #define HOST_OVRCURR_LINE GPIO_Pin_5 |
| #define HOST_OVRCURR_PIN_SOURCE GPIO_PinSourceD |
| #define HOST_OVRCURR_PORT GPIOD |
| #define HOST_OVRCURR_PORT_RCC RCC_APB2Periph_GPIOD |
| #define HOST_OVRCURR_PORT_SOURCE GPIO_PortSourceGPIOD |
| #define HOST_POWERSW_PORT GPIOC |
| #define HOST_POWERSW_PORT_RCC RCC_AHB1Periph_GPIOC |
| #define HOST_POWERSW_VBUS GPIO_Pin_0 |
| #define TIM_MSEC_DELAY 0x01 |
| #define TIM_USEC_DELAY 0x02 |
| #define USE_ACCURATE_TIME |
| static void BSP_Delay |
( |
uint32_t |
nTime, |
|
|
uint8_t |
unit |
|
) |
| |
|
static |
BSP_Delay Delay routine based on TIM2.
- Parameters
-
| nTime | : Delay Time |
| unit | : Delay Time unit : mili sec / micro sec |
- Return values
-
BSP_Init board user initializations.
- Parameters
-
- Return values
-
| static void BSP_SetTime |
( |
uint8_t |
unit | ) |
|
|
static |
BSP_SetTime Configures TIM2 for delay routine based on TIM2.
- Parameters
-
- Return values
-
| void USB_OTG_BSP_ConfigVBUS |
( |
USB_OTG_CORE_HANDLE * |
pdev | ) |
|
USB_OTG_BSP_ConfigVBUS Configures the IO for the Vbus and OverCurrent.
- Parameters
-
- Return values
-
| void USB_OTG_BSP_DriveVBUS |
( |
USB_OTG_CORE_HANDLE * |
pdev, |
|
|
uint8_t |
state |
|
) |
| |
BSP_Drive_VBUS Drives the Vbus signal through IO.
- Parameters
-
- Return values
-
| void USB_OTG_BSP_EnableInterrupt |
( |
USB_OTG_CORE_HANDLE * |
pdev | ) |
|
USB_OTG_BSP_EnableInterrupt Configures USB Global interrupt.
- Parameters
-
- Return values
-
| void USB_OTG_BSP_Init |
( |
USB_OTG_CORE_HANDLE * |
pdev | ) |
|
USB_OTG_BSP_Init Initilizes BSP configurations.
- Parameters
-
- Return values
-
| void USB_OTG_BSP_mDelay |
( |
const uint32_t |
msec | ) |
|
USB_OTG_BSP_mDelay This function provides delay time in milli sec.
- Parameters
-
| msec | : Value of delay required in milli sec |
- Return values
-
| static void USB_OTG_BSP_TimeInit |
( |
void |
| ) |
|
|
static |
USB_OTG_BSP_TimeInit Initializes delay unit using Timer2.
- Parameters
-
- Return values
-
| void USB_OTG_BSP_TimerIRQ |
( |
void |
| ) |
|
USB_OTG_BSP_TimerIRQ Time base IRQ.
- Parameters
-
- Return values
-
| void USB_OTG_BSP_uDelay |
( |
const uint32_t |
usec | ) |
|
USB_OTG_BSP_uDelay This function provides delay time in micro sec.
- Parameters
-
| usec | : Value of delay required in micro sec |
- Return values
-
| __IO uint32_t BSP_delay = 0 |
| ErrorStatus HSEStartUpStatus |