cc2531: change cdc-acm descriptor

Change to have a real usb VID/PID and better fit the capabilities
of the CC2531 hardware (enpoint size, location).

Compile only if the cdc-acm class is requested.

See Pull Request #18
This commit is contained in:
Philippe Rétornaz 2012-08-07 15:16:31 +02:00 committed by George Oikonomou
parent 0e55eb0947
commit dec34c21ef

View File

@ -3,20 +3,22 @@
#include "cdc.h"
#include "usb-arch.h"
#if USB_CONF_CLASS == 1
const struct usb_st_device_descriptor device_descriptor =
{
sizeof(struct usb_st_device_descriptor),
DEVICE,
0x0210,
0x0200,
CDC,
0,
0,
CTRL_EP_SIZE,
0xffff,
0xffff,
0x0030,
2,
0x0617, /* EPFL usb ID */
0x000B, /* Don't mess with it please */
0x0000,
1,
2,
3,
1
};
@ -45,7 +47,7 @@ const struct configuration_st {
1,
0,
0x80,
50
250
},
{
sizeof(configuration_block.comm),
@ -68,7 +70,7 @@ const struct configuration_st {
sizeof(configuration_block.abstract_ctrl),
CS_INTERFACE,
CDC_FUNC_DESCR_ABSTRACT_CTRL_MGMNT,
0
0x2, // Set line coding
},
{
sizeof(configuration_block.union_descr),
@ -81,16 +83,16 @@ const struct configuration_st {
sizeof(configuration_block.call_mgmt),
CS_INTERFACE,
CDC_FUNC_DESCR_CALL_MGMNT,
0x02,
0x00,
1 /* data interface */
},
{
sizeof(configuration_block.ep_notification),
ENDPOINT,
0x83,
0x81,
0x03,
USB_EP3_SIZE,
100
USB_EP1_SIZE,
255 /* 255ms polling, not really used so maximum value used */
},
{
sizeof(configuration_block.data),
@ -100,23 +102,23 @@ const struct configuration_st {
2,
CDC_DATA,
0,
TRANSPARENT_PROTOCOL,
/*TRANSPARENT_PROTOCOL*/ 0,
0
},
{
sizeof(configuration_block.ep_in),
ENDPOINT,
0x81,
0x82,
0x02,
USB_EP1_SIZE,
USB_EP2_SIZE,
0
},
{
sizeof(configuration_block.ep_out),
ENDPOINT,
0x03,
0x02,
0x02,
USB_EP2_SIZE,
USB_EP3_SIZE,
0
}
@ -124,3 +126,5 @@ const struct configuration_st {
const struct usb_st_configuration_descriptor const *configuration_head =
(struct usb_st_configuration_descriptor const*)&configuration_block;
#endif