127 lines
2.7 KiB
C
127 lines
2.7 KiB
C
/**
|
|
******************************************************************************
|
|
* @file usbd_usr.c
|
|
* @author MCD Application Team
|
|
* @version V1.0.0
|
|
* @date 19-September-2011
|
|
* @brief This file includes the user application layer
|
|
******************************************************************************
|
|
* @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>© COPYRIGHT 2011 STMicroelectronics</center></h2>
|
|
******************************************************************************
|
|
*/
|
|
|
|
#include "usbd_usr.h"
|
|
#include "usbd_ioreq.h"
|
|
|
|
USBD_Usr_cb_TypeDef USR_cb =
|
|
{
|
|
USBD_USR_Init,
|
|
USBD_USR_DeviceReset,
|
|
USBD_USR_DeviceConfigured,
|
|
USBD_USR_DeviceSuspended,
|
|
USBD_USR_DeviceResumed,
|
|
|
|
USBD_USR_DeviceConnected,
|
|
USBD_USR_DeviceDisconnected,
|
|
};
|
|
|
|
|
|
/**
|
|
* @brief USBD_USR_Init
|
|
* Displays the message on LCD for host lib initialization
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
void USBD_USR_Init(void)
|
|
{
|
|
|
|
}
|
|
|
|
/**
|
|
* @brief USBD_USR_DeviceReset
|
|
* Displays the message on LCD on device Reset Event
|
|
* @param speed : device speed
|
|
* @retval None
|
|
*/
|
|
void USBD_USR_DeviceReset(uint8_t speed )
|
|
{
|
|
switch (speed)
|
|
{
|
|
case USB_OTG_SPEED_HIGH:
|
|
break;
|
|
|
|
case USB_OTG_SPEED_FULL:
|
|
break;
|
|
default:
|
|
break;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* @brief USBD_USR_DeviceConfigured
|
|
* Displays the message on LCD on device configuration Event
|
|
* @param None
|
|
* @retval Status
|
|
*/
|
|
void USBD_USR_DeviceConfigured (void)
|
|
{
|
|
}
|
|
|
|
|
|
/**
|
|
* @brief USBD_USR_DeviceConnected
|
|
* Displays the message on LCD on device connection Event
|
|
* @param None
|
|
* @retval Status
|
|
*/
|
|
void USBD_USR_DeviceConnected (void)
|
|
{
|
|
}
|
|
|
|
|
|
/**
|
|
* @brief USBD_USR_DeviceDisonnected
|
|
* Displays the message on LCD on device disconnection Event
|
|
* @param None
|
|
* @retval Status
|
|
*/
|
|
void USBD_USR_DeviceDisconnected (void)
|
|
{
|
|
}
|
|
|
|
/**
|
|
* @brief USBD_USR_DeviceSuspended
|
|
* Displays the message on LCD on device suspend Event
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
void USBD_USR_DeviceSuspended(void)
|
|
{
|
|
/* Users can do their application actions here for the USB-Reset */
|
|
}
|
|
|
|
|
|
/**
|
|
* @brief USBD_USR_DeviceResumed
|
|
* Displays the message on LCD on device resume Event
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
void USBD_USR_DeviceResumed(void)
|
|
{
|
|
/* Users can do their application actions here for the USB-Reset */
|
|
}
|
|
|
|
|