// Device descriptor
const DEV_DESC: [u8; 18] =
0x12, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x40,
0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x01, 0x02,
0x03, 0x01
;
// Configuration descriptor
const CONF_DESC: [u8; 25] =
0x09, 0x02, 0x19, 0x00, 0x01, 0x01, 0x04, 0x80, 0xfa,
0x09, 0x04, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x05,
0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00
;
// String Descriptor zero
const STR_DESC_0: [u8; 4] = 0x04, 0x03, 0x09, 0x08 ;
// String Descriptor 1, "Rusty Manufacturer"
const STR_DESC_1: [u8; 38] =
0x26, 0x03, 0x52, 0x00, 0x75, 0x00, 0x73, 0x00,
0x74, 0x00, 0x79, 0x00, 0x20, 0x00, 0x4d, 0x00,
0x61, 0x00, 0x6e, 0x00, 0x75, 0x00, 0x66, 0x00,
0x61, 0x00, 0x63, 0x00, 0x74, 0x00, 0x75, 0x00,
0x72, 0x00, 0x65, 0x00, 0x72, 0x00
;
// String Descriptor 2, "Rusty Product"
const STR_DESC_2: [u8; 28] =
0x1c, 0x03, 0x52, 0x00, 0x75, 0x00, 0x73, 0x00,
0x74, 0x00, 0x79, 0x00, 0x20, 0x00, 0x50, 0x00,
0x72, 0x00, 0x6f, 0x00, 0x64, 0x00, 0x75, 0x00,
0x63, 0x00, 0x74, 0x00
;
// String Descriptor 3, "123ABC"
const STR_DESC_3: [u8; 14] =
0x0e, 0x03, 0x31, 0x00, 0x32, 0x00, 0x33, 0x00,
0x41, 0x00, 0x42, 0x00, 0x43, 0x00
;
// String Descriptor 4, "Rusty Configuration"
const STR_DESC_4: [u8; 40] =
0x28, 0x03, 0x52, 0x00, 0x75, 0x00, 0x73, 0x00,
0x74, 0x00, 0x79, 0x00, 0x20, 0x00, 0x43, 0x00,
0x6f, 0x00, 0x6e, 0x00, 0x66, 0x00, 0x69, 0x00,
0x67, 0x00, 0x75, 0x00, 0x72, 0x00, 0x61, 0x00,
0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00
;
// String Descriptor 5, "Rusty Interface"
const STR_DESC_5: [u8; 32] =
0x20, 0x03, 0x52, 0x00, 0x75, 0x00, 0x73, 0x00,
0x74, 0x00, 0x79, 0x00, 0x20, 0x00, 0x49, 0x00,
0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00,
0x66, 0x00, 0x61, 0x00, 0x63, 0x00, 0x65, 0x00
;
With the above, we're a step closer to our first prototype which will hopefully
be enumerable. Next time we'll look at beginning our prototype low level USB
device stack mock-up.