00001 #ifndef _USB_SPECIFIC_REQUEST_H_ 00002 #define _USB_SPECIFIC_REQUEST_H_ 00003 00004 //_____ I N C L U D E S ____________________________________________________ 00005 00006 #include "config.h" 00007 00008 00009 //_____ M A C R O S ________________________________________________________ 00010 00011 extern code S_usb_device_descriptor usb_dev_desc; 00012 extern code S_usb_user_configuration_descriptor usb_conf_desc; 00013 extern code S_usb_manufacturer_string_descriptor usb_user_manufacturer_string_descriptor; 00014 extern code S_usb_product_string_descriptor usb_user_product_string_descriptor; 00015 #if (USB_DEVICE_SN_USE==ENABLE) 00016 extern code S_usb_serial_number usb_user_serial_number; 00017 #endif 00018 extern code S_usb_language_id usb_user_language_id; 00019 00020 00021 //_____ D E F I N I T I O N ________________________________________________ 00022 00023 Bool usb_user_read_request ( U8, U8 ); 00024 void usb_user_endpoint_init ( U8 ); 00025 U8 usb_user_interface_get ( U16 wInterface ); 00026 void usb_user_interface_reset ( U16 wInterface, U8 alternate_setting ); 00027 Bool usb_user_get_descriptor ( U8 , U8 ); 00028 00029 #define SETUP_HID_GET_REPORT 0x01 00030 #define SETUP_HID_GET_IDLE 0x02 00031 #define SETUP_HID_GET_PROTOCOL 0x03 00032 #define SETUP_HID_SET_REPORT 0x09 00033 #define SETUP_HID_SET_IDLE 0x0A 00034 #define SETUP_HID_SET_PROTOCOL 0x0B 00035 #define REPORT_TYPE_INPUT 0x01 00036 #define REPORT_TYPE_OUTPUT 0x02 00037 #define REPORT_TYPE_FEATURE 0x03 00038 00039 00041 typedef struct { 00042 U8 report[0x34]; 00043 } S_usb_hid_report_descriptor_mouse; 00044 00045 #endif 00046