usb_user_configuration.c
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
#include "config.h"
00023
#include "conf\conf_usb.h"
00024
#include "lib_mcu\usb\usb_drv.h"
00025
#include "usb_enum.h"
00026
#include "usb_user_configuration.h"
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 code
S_usb_device_descriptor usb_dev_desc_hid =
00038 {
00039
sizeof(
usb_dev_desc_hid)
00040 ,
DEVICE_DESCRIPTOR
00041 ,
USB_SPECIFICATION
00042 ,
DEVICE_CLASS
00043 ,
DEVICE_SUB_CLASS
00044 ,
DEVICE_PROTOCOL
00045 ,
EP_CONTROL_LENGTH
00046 ,
VENDOR_ID
00047 ,
PRODUCT_ID
00048 ,
RELEASE_NUMBER
00049 ,
MAN_INDEX
00050 ,
PROD_INDEX
00051 ,
SN_INDEX
00052 ,
NB_CONFIGURATION
00053 };
00054
00055
00056 code
S_usb_device_qualifier_descriptor usb_qual_desc_hid =
00057 {
00058
sizeof(
S_usb_device_qualifier_descriptor)
00059 ,
DEVICE_QUALIFIER_DESCRIPTOR
00060 ,
USB_SPECIFICATION
00061 ,
DEVICE_CLASS
00062 ,
DEVICE_SUB_CLASS
00063 ,
DEVICE_PROTOCOL
00064 ,
EP_CONTROL_LENGTH
00065 ,
NB_CONFIGURATION
00066 , 0x00
00067 };
00068
00069
00070 code
S_usb_user_configuration_descriptor usb_conf_desc_hid_fs = {
00071 {
sizeof(
S_usb_configuration_descriptor)
00072 ,
CONFIGURATION_DESCRIPTOR
00073 ,
wSWAP(
sizeof(
usb_conf_desc_hid_fs))
00074 ,
NB_INTERFACE_FS
00075 ,
CONF_NB_FS
00076 ,
CONF_INDEX_FS
00077 ,
CONF_ATTRIBUTES_FS
00078 ,
MAX_POWER_FS
00079 }
00080 ,
00081 {
sizeof(
S_usb_interface_descriptor)
00082 ,
INTERFACE_DESCRIPTOR
00083 ,
INTERFACE_NB_FS
00084 ,
ALTERNATE_FS
00085 ,
NB_ENDPOINT_FS
00086 ,
INTERFACE_CLASS_FS
00087 ,
INTERFACE_SUB_CLASS_FS
00088 ,
INTERFACE_PROTOCOL_FS
00089 ,
INTERFACE_INDEX_FS
00090 }
00091 ,
00092 {
sizeof(
S_usb_hid_descriptor)
00093 ,
HID
00094 , 0x1101
00095 , 8
00096 , 1
00097 ,
REPORT
00098 , 0x3500
00099 }
00100 ,
00101 {
sizeof(
S_usb_endpoint_descriptor)
00102 ,
ENDPOINT_DESCRIPTOR
00103 ,
ENDPOINT_NB_1_FS
00104 ,
EP_ATTRIBUTES_1_FS
00105 ,
EP_SIZE_1_FS
00106 ,
EP_INTERVAL_1_FS
00107 }
00108 ,
00109 {
sizeof(
S_usb_endpoint_descriptor)
00110 ,
ENDPOINT_DESCRIPTOR
00111 ,
ENDPOINT_NB_2_FS
00112 ,
EP_ATTRIBUTES_2_FS
00113 ,
EP_SIZE_2_FS
00114 ,
EP_INTERVAL_2_FS
00115 }
00116 };
00117
00118 code
U8 hid_report[
SIZE_OF_REPORT] = {
00119 0x06, 0xFF, 0xFF,
00120 0x09, 0x01,
00121 0xA1, 0x01,
00122
00123 0x09, 0x02,
00124 0x09, 0x03,
00125 0x15, 0x00,
00126 0x26, 0xFF, 0x00,
00127 0x75, 0x08,
00128 0x95,
LENGTH_OF_REPORT,
00129 0x81, 0x02,
00130
00131 0x09, 0x04,
00132 0x09, 0x05,
00133 0x15, 0x00,
00134 0x26, 0xFF, 0x00,
00135 0x75, 0x08,
00136 0x95,
LENGTH_OF_REPORT,
00137 0x91, 0x02,
00138
00139 0x09, 0x06,
00140 0x09, 0x07,
00141 0x15, 0x00,
00142 0x26, 0xFF,0x00,
00143 0x75, 0x08,
00144 0x95, 0x04,
00145 0xB1, 0x02,
00146 0xC0
00147 };
00148
00149
00150 code
S_usb_manufacturer_string_descriptor usb_user_manufacturer_string_descriptor = {
00151
sizeof(
usb_user_manufacturer_string_descriptor)
00152 ,
STRING_DESCRIPTOR
00153 ,
USB_MANUFACTURER_NAME
00154 };
00155
00156
00157
00158 code
S_usb_product_string_descriptor usb_user_product_string_descriptor = {
00159
sizeof(
usb_user_product_string_descriptor)
00160 ,
STRING_DESCRIPTOR
00161 ,
USB_PRODUCT_NAME
00162 };
00163
00164
00165
00166 code
S_usb_serial_number usb_user_serial_number = {
00167
sizeof(
usb_user_serial_number)
00168 ,
STRING_DESCRIPTOR
00169 ,
USB_SERIAL_NUMBER
00170 };
00171
00172
00173
00174
00175 code
S_usb_language_id usb_user_language_id = {
00176
sizeof(
usb_user_language_id)
00177 ,
STRING_DESCRIPTOR
00178 ,
LANGUAGE_ID
00179 };
00180
00181
Generated on Mon Apr 10 17:23:30 2006 for Atmel by
1.3.7