Completing CMake variable generation for USB parameters (AVR Support)

- Had to add the iSerialNumber parameter to the AVR USB descriptor
- Removed a faulty pack command for avr-gcc that is not required
This commit is contained in:
Jacob Alexander 2013-02-01 20:30:14 -05:00
parent b7afaa100f
commit 99b3deba67
7 changed files with 58 additions and 11 deletions

View file

@ -23,10 +23,6 @@
#define DEVICE_CLASS 0xEF
#define DEVICE_SUBCLASS 0x02
#define DEVICE_PROTOCOL 0x01
#define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME {'S','e','r','i','a','l','/','K','e','y','b','o','a','r','d','/','M','o','u','s','e','/','J','o','y','s','t','i','c','k'}
#define PRODUCT_NAME_LEN 30
#define EP0_SIZE 64
#define NUM_ENDPOINTS 15
#define NUM_INTERFACE 5

View file

@ -94,7 +94,7 @@ static const uint8_t PROGMEM device_descriptor[] = {
0x00, 0x01, // bcdDevice
1, // iManufacturer
2, // iProduct
0, // iSerialNumber
3, // iSerialNumber
1 // bNumConfigurations
};
@ -239,6 +239,11 @@ static const struct usb_string_descriptor_struct PROGMEM string2 = {
3,
STR_PRODUCT
};
static const struct usb_string_descriptor_struct PROGMEM string3 = {
sizeof(STR_SERIAL),
3,
STR_SERIAL
};
// This table defines which descriptor data is sent for each specific
// request from the host (in wValue and wIndex).
@ -256,7 +261,8 @@ static const struct descriptor_list_struct {
{0x2100, DEBUG_INTERFACE, config1_descriptor+DEBUG_HID_DESC_OFFSET, 9},
{0x0300, 0x0000, (const uint8_t *)&string0, 4},
{0x0301, 0x0409, (const uint8_t *)&string1, sizeof(STR_MANUFACTURER)},
{0x0302, 0x0409, (const uint8_t *)&string2, sizeof(STR_PRODUCT)}
{0x0302, 0x0409, (const uint8_t *)&string2, sizeof(STR_PRODUCT)},
{0x0303, 0x0409, (const uint8_t *)&string3, sizeof(STR_SERIAL)}
};
#define NUM_DESC_LIST (sizeof(descriptor_list)/sizeof(struct descriptor_list_struct))
@ -697,4 +703,3 @@ ISR(USB_COM_vect)
UECONX = (1<<STALLRQ) | (1<<EPEN); // stall
}

View file

@ -87,3 +87,4 @@ void usb_debug_flush_output(void); // immediately transmit any buffered output
#define CDC_SET_CONTROL_LINE_STATE 0x22
#endif
#endif