// -------------------------------------------------------------------- // Copyright (c) 2007 by Terasic Technologies Inc. // -------------------------------------------------------------------- // // Permission: // // Terasic grants permission to use and modify this code for use // in synthesis for all Terasic Development Boards and Altera Development // Kits made by Terasic. Other use of this code, including the selling // ,duplication, or modification of any portion is strictly prohibited. // // Disclaimer: // // This VHDL/Verilog or C/C++ source code is intended as a design reference // which illustrates how these types of functions can be implemented. // It is the user's responsibility to verify their design for // consistency and functionality through the use of formal // verification methods. Terasic provides no warranty regarding the use // or functionality of this code. // // -------------------------------------------------------------------- // // Terasic Technologies Inc // 356 Fu-Shin E. Rd Sec. 1. JhuBei City, // HsinChu County, Taiwan // 302 // // web: http://www.terasic.com/ // email: support@terasic.com // // -------------------------------------------------------------------- // Author: Richard Chang #ifndef USB_CLASS_H_ #define USB_CLASS_H_ #include "usb_host.h" #include "usb_protocol.h" #include "usb_hub.h" typedef enum{ USB_DEVICE_TYPE_MOUSE=0, USB_DEVICE_TYPE_DISK, USB_DEVICE_TYPE_UNKNOWN }USB_DEVICE_TYPE; USB_DEVICE_TYPE USBCLASS_GetDeviceType(HUB_HANDLE hHub, alt_u8 Port, USB_SPEED Speed); void USBCLASS_GetDeviceTypeName(USB_DEVICE_TYPE DeviceType, char *pBuffer, int nBufferLen); // USB DeviceClass #define USBCS_DEVICE 0x00 // use class information in the Interface Descriptors #define USBCS_AUDIO 0x01 #define USBCS_CCD 0x02 // Communications and CCD Control #define USBCS_HID 0x03 #define USBCS_PHYSICAL 0x05 #define USBCS_IMAGE 0x06 #define USBCS_PRINTER 0x07 #define USBCS_MASS_STORAGE 0x08 #define USBCS_HUB 0x09 #define USBCS_CCD_DATA 0x0A #define USBCS_SMART_CARD 0x0B #define USBCS_CONTENT_SECURITY 0x0D #define USBCS_PERSONAL_HEALTH 0x0F #define USBCS_DIAGNOSTIC 0xDC #define USBCS_WIRELESS_CONTROL 0xE0 #define USBCS_MISC 0xEF // Miscellaneous #define USBCS_APP_SPECIFIC 0xFE #define USBCS_VENDER_SPECIFIC 0xFF #endif /*USB_CLASS_H_*/