/*
 * descriptor.c
 *
 *  Descriptor information to pass to USB_Init()
 *
 */

#include "descriptor.h"

/*** [BEGIN] USB Descriptor Information [BEGIN] ***/

#define STRING1_LEN sizeof ("Silicon Labs") * 2
const uint8_t code USB_MfrStr[] = // Manufacturer String
{
   STRING1_LEN, 0x03,
   'S', 0,
   'i', 0,
   'l', 0,
   'i', 0,
   'c', 0,
   'o', 0,
   'n', 0,
   ' ', 0,
   'L', 0,
   'a', 0,
   'b', 0,
   's', 0,
};


#define STRING2_LEN sizeof("USBXpress device") * 2
const uint8_t code USB_ProductStr[] = // Product Desc. String
{
   STRING2_LEN, 0x03,
   'U', 0,
   'S', 0,
   'B', 0,
   'X', 0,
   'p', 0,
   'r', 0,
   'e', 0,
   's', 0,
   's', 0,
   ' ', 0,
   'D', 0,
   'e', 0,
   'v', 0,
   'i', 0,
   'c', 0,
   'e', 0
};

#define STRING3_LEN sizeof("0005") * 2
const uint8_t code USB_SerialStr[] = // Serial Number String
{
   STRING3_LEN, 0x03,
   '0', 0,
   '0', 0,
   '0', 0,
   '5', 0
};


const USBXpress_Init_TypeDef InitStruct =
{
   0x10C4,                 // Vendor ID
   0xEA61,                 // Product ID
   USB_MfrStr,             // Pointer to Manufacturer String
   USB_ProductStr,         // Pointer to Product String
   USB_SerialStr,          // Pointer to Serial String
   32,                     // Max Power / 2
   0x80,                   // Power Attribute
   0x0100,                 // Device Release # (BCD format)
   true                   // Use USB FIFO space true  false
};
