00001 #include "descriptors.h"
00002 #include <cdc-acm/cdc.h>
00003 #include <contiki-conf.h>
00004 #include <usb-arch.h>
00005
00006 const struct usb_st_device_descriptor device_descriptor =
00007 {
00008 sizeof(struct usb_st_device_descriptor),
00009 DEVICE,
00010 0x0210,
00011 CDC,
00012 0,
00013 0,
00014 CTRL_EP_SIZE,
00015 0xffff,
00016 0xffff,
00017 0x0010,
00018 2,
00019 1,
00020 3,
00021 1
00022 };
00023
00024 const struct configuration_st {
00025 struct usb_st_configuration_descriptor configuration;
00026 struct usb_st_interface_descriptor comm;
00027 struct usb_cdc_header_func_descriptor header;
00028 struct usb_cdc_union_func_descriptor union_descr;
00029 struct usb_cdc_ethernet_func_descriptor ethernet;
00030 #if 1
00031 struct usb_st_endpoint_descriptor ep_notification;
00032 #endif
00033 struct usb_st_interface_descriptor data;
00034 struct usb_st_endpoint_descriptor ep_in;
00035 struct usb_st_endpoint_descriptor ep_out;
00036 } BYTE_ALIGNED configuration_block =
00037 {
00038
00039 {
00040 sizeof(configuration_block.configuration),
00041 CONFIGURATION,
00042 sizeof(configuration_block),
00043 2,
00044 1,
00045 0,
00046 0x80,
00047 50
00048 },
00049 {
00050 sizeof(configuration_block.comm),
00051 INTERFACE,
00052 0,
00053 0,
00054 1,
00055 CDC,
00056 ETHERNET_NETWORKING_CONTROL_MODEL,
00057 0,
00058 0
00059 },
00060 {
00061 sizeof(configuration_block.header),
00062 CS_INTERFACE,
00063 CDC_FUNC_DESCR_HEADER,
00064 0x0110
00065 },
00066 {
00067 sizeof(configuration_block.union_descr),
00068 CS_INTERFACE,
00069 CDC_FUNC_DESCR_UNION,
00070 0,
00071 {1}
00072 },
00073 {
00074 sizeof(configuration_block.ethernet),
00075 CS_INTERFACE,
00076 CDC_FUNC_DESCR_ETHERNET,
00077 4,
00078 0,
00079 UIP_CONF_BUFFER_SIZE - UIP_CONF_LLH_LEN + 14,
00080 0,
00081 0
00082 },
00083 {
00084 sizeof(configuration_block.ep_notification),
00085 ENDPOINT,
00086 0x83,
00087 0x03,
00088 8,
00089 100
00090 },
00091 {
00092 sizeof(configuration_block.data),
00093 INTERFACE,
00094 1,
00095 0,
00096 2,
00097 CDC_DATA,
00098 0,
00099 TRANSPARENT_PROTOCOL,
00100 0
00101 },
00102 {
00103 sizeof(configuration_block.ep_in),
00104 ENDPOINT,
00105 0x81,
00106 0x02,
00107 64,
00108 0
00109 },
00110 {
00111 sizeof(configuration_block.ep_out),
00112 ENDPOINT,
00113 0x02,
00114 0x02,
00115 64,
00116 0
00117 }
00118
00119 };
00120
00121 const struct usb_st_configuration_descriptor const *configuration_head =
00122 (struct usb_st_configuration_descriptor const*)&configuration_block;