Change the cc2531 usb stick descriptor

The CC2531 USB stick now identifies itself as a
'Texas Instruments CC2531 USB Dongle' and uses a
TI-assigmed VID:PID. The VID:PID is now configurable
in contiki- or project-conf.h
This commit is contained in:
George Oikonomou 2013-03-23 19:07:24 +00:00 committed by George Oikonomou
parent 0614c4e720
commit 1b0470687b
3 changed files with 12 additions and 6 deletions

View File

@ -14,8 +14,8 @@ const struct usb_st_device_descriptor device_descriptor =
0, 0,
0, 0,
CTRL_EP_SIZE, CTRL_EP_SIZE,
0x0617, /* EPFL usb ID */ CDC_ACM_CONF_VID,
0x000B, /* Don't mess with it please */ CDC_ACM_CONF_PID,
0x0000, 0x0000,
1, 1,
2, 2,

View File

@ -68,22 +68,25 @@ static struct {
static const struct { static const struct {
uint8_t size; uint8_t size;
uint8_t type; uint8_t type;
uint16_t string[10]; uint16_t string[17];
} string_manufacturer = { } string_manufacturer = {
sizeof(string_manufacturer), sizeof(string_manufacturer),
3, 3,
{ 'E', 'P', 'F', 'L', '-', 'L', 'S', 'R', 'O', '1' } {
'T', 'e', 'x', 'a', 's', ' ',
'I', 'n', 's', 't', 'r', 'u', 'm', 'e', 'n', 't', 's'
}
}; };
static const struct { static const struct {
uint8_t size; uint8_t size;
uint8_t type; uint8_t type;
uint16_t string[18]; uint16_t string[17];
} string_product = { } string_product = {
sizeof(string_product), sizeof(string_product),
3, { 3, {
'C', 'C', '2', '5', '3', '1', ' ', 'C', 'C', '2', '5', '3', '1', ' ',
'D', 'e', 'v', 'e', 'l', '-', 'B', 'o', 'a', 'r', 'd' 'U', 'S', 'B', ' ', 'D', 'o', 'n', 'g', 'l', 'e'
} }
}; };
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/

View File

@ -81,6 +81,9 @@
#define USB_CONF_CLASS 1 /* CDC-ACM */ #define USB_CONF_CLASS 1 /* CDC-ACM */
#endif #endif
#define CDC_ACM_CONF_VID 0x0451 /* Vendor: TI */
#define CDC_ACM_CONF_PID 0x16A8 /* cc2531 CDC */
#undef LEDS_CONF_ALL #undef LEDS_CONF_ALL
#define LEDS_CONF_ALL 3 #define LEDS_CONF_ALL 3
#define LEDS_RED 1 #define LEDS_RED 1