Nut/OS  5.0.5
API Reference
usb_prop.h
Go to the documentation of this file.
00001 /******************** (C) COPYRIGHT 2010 STMicroelectronics ********************
00002 * File Name          : usb_prop.h
00003 * Author             : MCD Application Team
00004 * Version            : V3.1.1
00005 * Date               : 04/07/2010
00006 * Description        : All processing related to Virtual COM Port Demo (Endpoint 0)
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_prop_H
00018 #define __usb_prop_H
00019 
00020 /* Includes ------------------------------------------------------------------*/
00021 /* Exported types ------------------------------------------------------------*/
00022 typedef struct
00023 {
00024   uint32_t bitrate;
00025   uint8_t format;
00026   uint8_t paritytype;
00027   uint8_t datatype;
00028 }LINE_CODING;
00029 
00030 /* Exported constants --------------------------------------------------------*/
00031 /* Exported macro ------------------------------------------------------------*/
00032 /* Exported define -----------------------------------------------------------*/
00033 
00034 #define Virtual_Com_Port_GetConfiguration          NOP_Process
00035 //#define Virtual_Com_Port_SetConfiguration          NOP_Process
00036 #define Virtual_Com_Port_GetInterface              NOP_Process
00037 #define Virtual_Com_Port_SetInterface              NOP_Process
00038 #define Virtual_Com_Port_GetStatus                 NOP_Process
00039 #define Virtual_Com_Port_ClearFeature              NOP_Process
00040 #define Virtual_Com_Port_SetEndPointFeature        NOP_Process
00041 #define Virtual_Com_Port_SetDeviceFeature          NOP_Process
00042 //#define Virtual_Com_Port_SetDeviceAddress          NOP_Process
00043 
00044 #define SEND_ENCAPSULATED_COMMAND   0x00
00045 #define GET_ENCAPSULATED_RESPONSE   0x01
00046 #define SET_COMM_FEATURE            0x02
00047 #define GET_COMM_FEATURE            0x03
00048 #define CLEAR_COMM_FEATURE          0x04
00049 #define SET_LINE_CODING             0x20
00050 #define GET_LINE_CODING             0x21
00051 #define SET_CONTROL_LINE_STATE      0x22
00052 #define SEND_BREAK                  0x23
00053 
00054 /* Exported functions ------------------------------------------------------- */
00055 void Virtual_Com_Port_init(void);
00056 void Virtual_Com_Port_Reset(void);
00057 void Virtual_Com_Port_SetConfiguration(void);
00058 void Virtual_Com_Port_SetDeviceAddress (void);
00059 void Virtual_Com_Port_Status_In (void);
00060 void Virtual_Com_Port_Status_Out (void);
00061 RESULT Virtual_Com_Port_Data_Setup(uint8_t);
00062 RESULT Virtual_Com_Port_NoData_Setup(uint8_t);
00063 RESULT Virtual_Com_Port_Get_Interface_Setting(uint8_t Interface, uint8_t AlternateSetting);
00064 uint8_t *Virtual_Com_Port_GetDeviceDescriptor(uint16_t );
00065 uint8_t *Virtual_Com_Port_GetConfigDescriptor(uint16_t);
00066 uint8_t *Virtual_Com_Port_GetStringDescriptor(uint16_t);
00067 
00068 uint8_t *Virtual_Com_Port_GetLineCoding(uint16_t Length);
00069 uint8_t *Virtual_Com_Port_SetLineCoding(uint16_t Length);
00070 
00071 #endif /* __usb_prop_H */
00072 
00073 /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
00074