Nut/OS  5.0.5
API Reference
usb_desc.h
Go to the documentation of this file.
00001 /******************** (C) COPYRIGHT 2010 STMicroelectronics ********************
00002 * File Name          : usb_desc.h
00003 * Author             : MCD Application Team
00004 * Version            : V3.1.1
00005 * Date               : 04/07/2010
00006 * Description        : Descriptor Header for Virtual COM Port Device
00007 ********************************************************************************
00008 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00009 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
00010 * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
00011 * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
00012 * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
00013 * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00014 *******************************************************************************/
00015 
00016 /* Define to prevent recursive inclusion -------------------------------------*/
00017 #ifndef __USB_DESC_H
00018 #define __USB_DESC_H
00019 
00020 /* Includes ------------------------------------------------------------------*/
00021 /* Exported types ------------------------------------------------------------*/
00022 /* Exported constants --------------------------------------------------------*/
00023 /* Exported macro ------------------------------------------------------------*/
00024 /* Exported define -----------------------------------------------------------*/
00025 #define USB_DEVICE_DESCRIPTOR_TYPE              0x01
00026 #define USB_CONFIGURATION_DESCRIPTOR_TYPE       0x02
00027 #define USB_STRING_DESCRIPTOR_TYPE              0x03
00028 #define USB_INTERFACE_DESCRIPTOR_TYPE           0x04
00029 #define USB_ENDPOINT_DESCRIPTOR_TYPE            0x05
00030 
00031 #define VIRTUAL_COM_PORT_DATA_SIZE              64
00032 //#define VIRTUAL_COM_PORT_INT_SIZE               8
00033 
00034 #define VIRTUAL_COM_PORT_SIZ_DEVICE_DESC        18
00035 #define VIRTUAL_COM_PORT_SIZ_CONFIG_DESC        67
00036 #define VIRTUAL_COM_PORT_SIZ_STRING_LANGID      4
00037 #define VIRTUAL_COM_PORT_SIZ_STRING_VENDOR      38
00038 #define VIRTUAL_COM_PORT_SIZ_STRING_PRODUCT     50
00039 #define VIRTUAL_COM_PORT_SIZ_STRING_SERIAL      26
00040 
00041 #define STANDARD_ENDPOINT_DESC_SIZE             0x09
00042 
00043 /* Exported functions ------------------------------------------------------- */
00044 extern const uint8_t Virtual_Com_Port_DeviceDescriptor[VIRTUAL_COM_PORT_SIZ_DEVICE_DESC];
00045 extern const uint8_t Virtual_Com_Port_ConfigDescriptor[VIRTUAL_COM_PORT_SIZ_CONFIG_DESC];
00046 
00047 extern const uint8_t Virtual_Com_Port_StringLangID[VIRTUAL_COM_PORT_SIZ_STRING_LANGID];
00048 extern const uint8_t Virtual_Com_Port_StringVendor[VIRTUAL_COM_PORT_SIZ_STRING_VENDOR];
00049 extern const uint8_t Virtual_Com_Port_StringProduct[VIRTUAL_COM_PORT_SIZ_STRING_PRODUCT];
00050 extern uint8_t Virtual_Com_Port_StringSerial[VIRTUAL_COM_PORT_SIZ_STRING_SERIAL];
00051 
00052 #endif /* __USB_DESC_H */
00053 /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/