Descriptores de los puertos:
Spoiler:
Código: Seleccionar todo
const unsigned short port1_device_descriptor[] = {
0x12, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08,
0xAA, 0xAA, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00,
0x00, 0x04,
};
const unsigned short port1_short_config_descriptor[] = {
0x09, 0x02, 0x00, 0x0f, 0x01, 0x00, 0x00, 0x80,
};
const unsigned short port1_config_descriptor[] = {
0x09, 0x02, 0x12, 0x00, 0x01, 0x00, 0x00, 0x80, 0xfa, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0xce, 0xb0, 0x03, 0xaa, 0xbb, 0xcc, 0xdd,
0x38, 0x63, 0xf0, 0x00, 0x38, 0xa0, 0x10, 0x00, 0x38, 0x80, 0x00, 0x01, 0x78, 0x84, 0xf8, 0x06,
0x64, 0x84, 0x00, 0x70, 0x38, 0xa5, 0xff, 0xf8, 0x7c, 0xc3, 0x28, 0x2a, 0x7c, 0xc4, 0x29, 0x2a,
0x28, 0x25, 0x00, 0x00, 0x40, 0x82, 0xff, 0xf0, 0x38, 0x84, 0x00, 0x80, 0x7c, 0x89, 0x03, 0xa6,
0x4e, 0x80, 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7c, 0x08, 0x02, 0xa6, 0xf8, 0x21, 0xff, 0x61, 0xfb, 0x61, 0x00, 0x78, 0xfb, 0x81, 0x00, 0x80,
0xfb, 0xa1, 0x00, 0x88, 0xfb, 0xc1, 0x00, 0x90, 0xfb, 0xe1, 0x00, 0x98, 0xf8, 0x01, 0x00, 0xb0,
0x3b, 0xe0, 0x00, 0x01, 0x7b, 0xff, 0xf8, 0x06, 0x7f, 0xe3, 0xfb, 0x78, 0x64, 0x63, 0x00, 0x05,
0x60, 0x63, 0x0b, 0x3c, 0x7f, 0xe4, 0xfb, 0x78, 0x64, 0x84, 0x00, 0x70, 0x60, 0x84, 0x01, 0xac,
0x38, 0xa0, 0x04, 0xfa, 0x4b, 0x97, 0xbf, 0x59, 0x7f, 0xe3, 0xfb, 0x78, 0x64, 0x63, 0x00, 0x05,
0x60, 0x63, 0x0b, 0x3c, 0x38, 0x63, 0x00, 0x20, 0x4b, 0x9d, 0x22, 0x01, 0x7f, 0xe3, 0xfb, 0x78,
0x64, 0x63, 0x00, 0x05, 0x60, 0x63, 0x0b, 0x3c, 0x7f, 0xe4, 0xfb, 0x78, 0x64, 0x84, 0x00, 0x2e,
0x60, 0x84, 0xb1, 0x28, 0x38, 0x63, 0x00, 0x10, 0xf8, 0x64, 0x01, 0x20, 0x7f, 0xe5, 0xfb, 0x78,
0x64, 0xa5, 0x00, 0x70, 0x60, 0xa5, 0x01, 0x50, 0x80, 0x65, 0x00, 0x00, 0x28, 0x03, 0x00, 0x00,
0x41, 0x82, 0x00, 0x18, 0x80, 0x85, 0x00, 0x04, 0x7c, 0x63, 0xfa, 0x14, 0x90, 0x83, 0x00, 0x00,
0x38, 0xa5, 0x00, 0x08, 0x4b, 0xff, 0xff, 0xe4, 0x48, 0x00, 0x05, 0x88, 0xf8, 0x21, 0xff, 0x51,
0x7c, 0x08, 0x02, 0xa6, 0xfb, 0xc1, 0x00, 0xa0, 0xfb, 0xe1, 0x00, 0xa8, 0xfb, 0xa1, 0x00, 0x98,
0xf8, 0x01, 0x00, 0xc0, 0x3b, 0xc0, 0x07, 0xd0, 0x3b, 0xe0, 0x00, 0xc8, 0x4b, 0x90, 0xa9, 0xb8,
0x00, 0x04, 0x90, 0xe0, 0xe8, 0x82, 0x0f, 0x08, 0x00, 0x04, 0x90, 0xe4, 0xe8, 0x7c, 0x00, 0x20,
0x00, 0x04, 0x90, 0xe8, 0xf8, 0x64, 0x00, 0x00, 0x00, 0x04, 0xf0, 0xa8, 0x48, 0x00, 0x1a, 0x9d,
0x00, 0x2a, 0xaf, 0xc8, 0x4b, 0xda, 0x5b, 0x80, 0x00, 0x04, 0xed, 0x18, 0x38, 0x80, 0x00, 0x00,
0x00, 0x04, 0xed, 0x1c, 0x90, 0x83, 0x00, 0x00, 0x00, 0x04, 0xed, 0x20, 0x4e, 0x80, 0x00, 0x20,
0x00, 0x3b, 0xa8, 0x90, 0x01, 0x00, 0x00, 0x00, 0x00, 0x05, 0x05, 0xd0, 0x38, 0x60, 0x00, 0x01,
0x00, 0x05, 0x05, 0xd4, 0x4e, 0x80, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x60, 0x00, 0x01,
0x4e, 0x80, 0x00, 0x20, 0x48, 0x00, 0x02, 0x78, 0x48, 0x00, 0x01, 0xec, 0x80, 0x00, 0x00, 0x00,
0x00, 0x05, 0x0c, 0xa8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0xe7, 0x20, 0x80, 0x00, 0x00, 0x00,
0x00, 0x05, 0x10, 0x32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0b, 0x7c, 0x80, 0x00, 0x00, 0x00,
0x00, 0x05, 0x0b, 0x8c, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0b, 0x9c, 0x80, 0x00, 0x00, 0x00,
0x00, 0x05, 0x0b, 0xd4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0xe7, 0x20, 0x80, 0x00, 0x00, 0x00,
0x00, 0x05, 0x0c, 0x1c, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0xe7, 0x20, 0x80, 0x00, 0x00, 0x00,
0x00, 0x05, 0x0c, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0xe7, 0x20, 0x80, 0x00, 0x00, 0x00,
0x00, 0x05, 0x0c, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0xe7, 0x20, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf8, 0x21, 0xff, 0x81, 0x7c, 0x08, 0x02, 0xa6, 0xf8, 0x01, 0x00, 0x90,
0x38, 0x80, 0x00, 0x00, 0x38, 0xa0, 0x00, 0x01, 0x48, 0x08, 0x1d, 0xb1, 0x80, 0xa3, 0x00, 0x08,
0x38, 0x60, 0x00, 0x00, 0x3c, 0x80, 0xaa, 0xaa, 0x60, 0x84, 0xc0, 0xde, 0x7c, 0x04, 0x28, 0x40,
0x41, 0x82, 0x00, 0x08, 0x38, 0x60, 0xff, 0xff, 0x7c, 0x63, 0x07, 0xb4, 0xe8, 0x01, 0x00, 0x90,
0x7c, 0x08, 0x03, 0xa6, 0x38, 0x21, 0x00, 0x80, 0x4e, 0x80, 0x00, 0x20, 0xf8, 0x21, 0xff, 0x81,
0x7c, 0x08, 0x02, 0xa6, 0xf8, 0x01, 0x00, 0x90, 0x38, 0x80, 0x00, 0x00, 0x48, 0x08, 0x1d, 0x99,
0x38, 0x81, 0x00, 0x70, 0x38, 0xa0, 0x00, 0x00, 0xf8, 0xa4, 0x00, 0x00, 0x38, 0xc0, 0x21, 0xaa,
0xb0, 0xc4, 0x00, 0x00, 0x38, 0xc0, 0x00, 0x00, 0xb0, 0xc4, 0x00, 0x06, 0x38, 0xc0, 0x00, 0x01,
0x78, 0xc6, 0xf8, 0x06, 0x64, 0xc6, 0x00, 0x05, 0x60, 0xc6, 0x0b, 0xac, 0x38, 0xe0, 0x00, 0x00,
0x48, 0x08, 0x1c, 0xcd, 0x38, 0x60, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x90, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x21, 0x00, 0x80, 0x4e, 0x80, 0x00, 0x20, 0x4e, 0x80, 0x00, 0x20, 0x39, 0x60, 0x00, 0xff,
0x44, 0x00, 0x00, 0x22, 0x2c, 0x03, 0x00, 0x00, 0x40, 0x82, 0x00, 0x1c, 0x38, 0x60, 0x00, 0x01,
0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x05, 0x60, 0x63, 0x0b, 0xbc, 0x38, 0x80, 0x00, 0x01,
0x90, 0x83, 0x00, 0x10, 0x4e, 0x80, 0x00, 0x20, 0xf8, 0x21, 0xff, 0x31, 0x7c, 0x08, 0x02, 0xa6,
0xf8, 0x01, 0x00, 0xe0, 0xfb, 0xe1, 0x00, 0xc8, 0x38, 0x81, 0x00, 0x70, 0x48, 0x16, 0x2e, 0x81,
0x3b, 0xe0, 0x00, 0x01, 0x7b, 0xff, 0xf8, 0x06, 0x67, 0xff, 0x00, 0x05, 0x63, 0xff, 0x0b, 0xbc,
0xe8, 0x7f, 0x00, 0x00, 0x2c, 0x23, 0x00, 0x00, 0x41, 0x82, 0x00, 0x0c, 0x38, 0x80, 0x00, 0x27,
0x48, 0x01, 0x17, 0xe9, 0x38, 0x80, 0x00, 0x27, 0x38, 0x60, 0x08, 0x00, 0x48, 0x01, 0x13, 0x9d,
0xf8, 0x7f, 0x00, 0x00, 0xe8, 0x81, 0x00, 0x70, 0x4b, 0xff, 0xc5, 0xf9, 0xe8, 0x61, 0x00, 0x70,
0x38, 0x80, 0x00, 0x27, 0x48, 0x01, 0x17, 0xc5, 0xe8, 0x7f, 0x00, 0x00, 0x4b, 0xff, 0xc6, 0x0d,
0xe8, 0x9f, 0x00, 0x00, 0x7c, 0x64, 0x1a, 0x14, 0xf8, 0x7f, 0x00, 0x08, 0x38, 0x60, 0x00, 0x00,
0xeb, 0xe1, 0x00, 0xc8, 0xe8, 0x01, 0x00, 0xe0, 0x38, 0x21, 0x00, 0xd0, 0x7c, 0x08, 0x03, 0xa6,
0x4e, 0x80, 0x00, 0x20, 0xf8, 0x21, 0xff, 0x61, 0x7c, 0x08, 0x02, 0xa6, 0xfb, 0x81, 0x00, 0x80,
0xfb, 0xa1, 0x00, 0x88, 0xfb, 0xe1, 0x00, 0x98, 0xfb, 0x41, 0x00, 0x70, 0xfb, 0x61, 0x00, 0x78,
0xf8, 0x01, 0x00, 0xb0, 0x7c, 0x9c, 0x23, 0x78, 0x7c, 0x7d, 0x1b, 0x78, 0x3b, 0xe0, 0x00, 0x01,
0x7b, 0xff, 0xf8, 0x06, 0x7f, 0xa3, 0xeb, 0x78, 0x7f, 0xe4, 0xfb, 0x78, 0x64, 0x84, 0x00, 0x05,
0x60, 0x84, 0x10, 0x28, 0x38, 0xa0, 0x00, 0x09, 0x4b, 0xff, 0xc5, 0xcd, 0x28, 0x23, 0x00, 0x00,
0x40, 0x82, 0x00, 0x34, 0x67, 0xff, 0x00, 0x05, 0x63, 0xff, 0x0b, 0xbc, 0x80, 0x7f, 0x00, 0x10,
0x28, 0x03, 0x00, 0x00, 0x41, 0x82, 0x00, 0x20, 0xe8, 0x7f, 0x00, 0x00, 0x28, 0x23, 0x00, 0x00,
0x41, 0x82, 0x00, 0x14, 0xe8, 0x7f, 0x00, 0x08, 0x38, 0x9d, 0x00, 0x09, 0x4b, 0xff, 0xc5, 0x45,
0xeb, 0xbf, 0x00, 0x00, 0x7f, 0xa3, 0xeb, 0x78, 0x48, 0x25, 0xa2, 0x38, 0x7c, 0x08, 0x02, 0xa6,
0xf8, 0x21, 0xfe, 0x61, 0xfb, 0x61, 0x00, 0x78, 0xfb, 0x81, 0x00, 0x80, 0xfb, 0xa1, 0x00, 0x88,
0xfb, 0xc1, 0x00, 0x90, 0xfb, 0xe1, 0x00, 0x98, 0xf8, 0x01, 0x01, 0xb0, 0x7c, 0x7d, 0x1b, 0x78,
0x7c, 0x9e, 0x23, 0x78, 0x3b, 0xe0, 0x00, 0x01, 0x7b, 0xff, 0xf8, 0x06, 0xeb, 0x82, 0x96, 0x00,
0xeb, 0x9c, 0x00, 0x68, 0xeb, 0x9c, 0x00, 0x18, 0xeb, 0x62, 0x0f, 0x08, 0xe9, 0x3d, 0x00, 0x18,
0x81, 0x29, 0x00, 0x30, 0x79, 0x29, 0x84, 0x02, 0x2c, 0x09, 0x00, 0x29, 0x40, 0x82, 0x00, 0x58,
0xe8, 0x9c, 0x00, 0x10, 0x78, 0x85, 0xc1, 0xe4, 0x78, 0xa5, 0x46, 0x20, 0x2c, 0x05, 0x00, 0xff,
0x41, 0x82, 0x00, 0x18, 0x60, 0x84, 0x00, 0x03, 0xf8, 0x9c, 0x00, 0x10, 0x38, 0x60, 0x00, 0x06,
0x90, 0x7e, 0x00, 0x00, 0x48, 0x00, 0x00, 0x14, 0x60, 0x84, 0x00, 0x02, 0xf8, 0x9c, 0x00, 0x10,
0x38, 0x60, 0x00, 0x2c, 0x90, 0x7e, 0x00, 0x00, 0x80, 0xbc, 0x00, 0x04, 0xe8, 0x9c, 0x00, 0x08,
0xe8, 0x7b, 0x00, 0x00, 0x7d, 0x23, 0x2a, 0x14, 0xf9, 0x3b, 0x00, 0x00, 0x48, 0x02, 0xb1, 0xc1,
0x48, 0x00, 0x00, 0xc4, 0x7f, 0xa3, 0xeb, 0x78, 0x7f, 0xc4, 0xf3, 0x78, 0x4b, 0xff, 0xd9, 0xb1,
0x7f, 0xfd, 0xfb, 0x78, 0x67, 0xbd, 0x00, 0x05, 0x63, 0xbd, 0x0b, 0xd0, 0x80, 0x7d, 0x00, 0x00,
0x80, 0xbc, 0x00, 0x04, 0x7c, 0x63, 0x2a, 0x14, 0x90, 0x7d, 0x00, 0x00, 0xe8, 0x9c, 0x00, 0x10,
0x78, 0x85, 0xc1, 0xe4, 0x78, 0xa5, 0x46, 0x20, 0x2c, 0x05, 0x00, 0xff, 0x40, 0x82, 0x00, 0x88,
0xe8, 0x7b, 0x00, 0x00, 0x38, 0x80, 0x00, 0x00, 0x38, 0xc0, 0x00, 0x00, 0x7c, 0xe3, 0x22, 0x14,
0x80, 0xa7, 0x00, 0x00, 0x7c, 0xc6, 0x2a, 0x78, 0x38, 0x84, 0x00, 0x04, 0x28, 0x24, 0x04, 0x00,
0x40, 0x82, 0xff, 0xec, 0x80, 0x7d, 0x00, 0x00, 0x78, 0xc6, 0x07, 0xc6, 0x7c, 0xc6, 0x1b, 0x78,
0x38, 0x60, 0x00, 0x00, 0x90, 0x7d, 0x00, 0x00, 0x7f, 0xe7, 0xfb, 0x78, 0x64, 0xe7, 0x00, 0x05,
0x60, 0xe7, 0x0f, 0x70, 0xe8, 0x67, 0x00, 0x00, 0x28, 0x23, 0x00, 0x00, 0x41, 0x82, 0x00, 0x38,
0x38, 0xe7, 0x00, 0x10, 0x7c, 0x23, 0x30, 0x40, 0x40, 0x82, 0xff, 0xec, 0xe8, 0xa7, 0xff, 0xf8,
0xe8, 0xfb, 0x00, 0x00, 0x80, 0x65, 0x00, 0x00, 0x28, 0x03, 0x00, 0x00, 0x41, 0x82, 0x00, 0x18,
0x80, 0x85, 0x00, 0x04, 0x7c, 0x63, 0x3a, 0x14, 0x90, 0x83, 0x00, 0x00, 0x38, 0xa5, 0x00, 0x08,
0x4b, 0xff, 0xff, 0xe4, 0x38, 0x60, 0x00, 0x00, 0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80,
0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90, 0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x01, 0xb0,
0x38, 0x21, 0x01, 0xa0, 0x7c, 0x08, 0x03, 0xa6, 0x4e, 0x80, 0x00, 0x20, 0xf8, 0x21, 0xff, 0x51,
0x7c, 0x08, 0x02, 0xa6, 0xfb, 0xc1, 0x00, 0xa0, 0xfb, 0xe1, 0x00, 0xa8, 0xfb, 0xa1, 0x00, 0x98,
0xf8, 0x01, 0x00, 0xc0, 0x3b, 0xc0, 0x0f, 0xa0, 0x3b, 0xe0, 0x00, 0xc8, 0x4b, 0xfb, 0x9b, 0x98,
0xa0, 0x55, 0x6f, 0x3d, 0x00, 0x2c, 0xb8, 0xfd, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xb8,
0x8c, 0x0a, 0x94, 0x8c, 0x00, 0x0d, 0x99, 0xb1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xe0,
0xa2, 0xbc, 0x1a, 0x56, 0x00, 0x05, 0x2a, 0xdc, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x10, 0x04,
0x6b, 0x70, 0x28, 0x02, 0x00, 0x02, 0x00, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xd4,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x53, 0x54, 0x38, 0x60, 0x00, 0x82,
0x00, 0x5f, 0x3f, 0xc0, 0x38, 0x60, 0x00, 0x01, 0x00, 0x5f, 0x3f, 0xc4, 0x4e, 0x80, 0x00, 0x20,
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xed, 0x0c, 0x3b, 0xa0, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x22, 0xb8, 0x88, 0x5f, 0x74, 0x6f, 0x6f, 0x00, 0x22, 0xb8, 0x8c, 0x6c, 0x32, 0x2e, 0x78,
0x00, 0x22, 0xb8, 0x90, 0x6d, 0x6c, 0x23, 0x72, 0x00, 0x22, 0xb8, 0x94, 0x6f, 0x6f, 0x74, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x68, 0xb8, 0x5f, 0x74, 0x6f, 0x6f, 0x00, 0x0d, 0x68, 0xbc,
0x6c, 0x32, 0x2e, 0x78, 0x00, 0x0d, 0x68, 0xc0, 0x6d, 0x6c, 0x23, 0x72, 0x00, 0x0d, 0x68, 0xc4,
0x6f, 0x6f, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x64, 0x65, 0x76, 0x5f, 0x78, 0x78, 0x78,
0x78, 0x00, 0x6d, 0x6f, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
0xeb, 0xe1, 0x00, 0x98, 0xe8, 0x01, 0x00, 0xb0, 0x38, 0x21, 0x00, 0xa0, 0x7c, 0x08, 0x03, 0xa6,
0x38, 0x60, 0x00, 0x01, 0x78, 0x63, 0xf8, 0x06, 0x64, 0x63, 0x00, 0x70, 0x38, 0x80, 0x00, 0x00,
0x38, 0xa0, 0x06, 0xe8, 0x4b, 0x94, 0xca, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xeb, 0x61, 0x00, 0x78, 0xeb, 0x81, 0x00, 0x80, 0xeb, 0xa1, 0x00, 0x88, 0xeb, 0xc1, 0x00, 0x90,
};
const unsigned short port2_device_descriptor[] = {
0x12, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08,
0xAA, 0xAA, 0xBB, 0xBB, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01,
};
const unsigned short port2_config_descriptor[] = {
// config
0x09, 0x02, 0x16, 0x00, 0x01, 0x01, 0x00, 0x80,
0x01,
// interface
0x09, 0x04, 0x00, 0x00, 0x00, 0xFE, 0x01, 0x02,
0x00,
// extra
0x04, 0x21, 0xb4, 0x2f,
};
const unsigned short port3_device_descriptor[] = {
0x12, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08,
0xAA, 0xAA, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02,
};
const unsigned short port3_config_descriptor[] = {
0x09, 0x02, 0x4d, 0x0a, 0x01, 0x01, 0x00, 0x80, 0x01, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09,
0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe,
0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00,
0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04,
0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00,
0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09,
0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00,
0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04,
0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00,
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09,
0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe,
0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04,
0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00,
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09,
0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe,
0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00,
0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00,
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00,
0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe,
0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00,
0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04,
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09,
0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe,
0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00,
0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04,
0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00,
0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09,
0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00,
0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04,
0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00,
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09,
0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe,
0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04,
0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00,
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09,
0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe,
0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00,
0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00,
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00,
0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe,
0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00,
0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04,
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09,
0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe,
0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00,
0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04,
0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00,
0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09,
0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00,
0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04,
0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00,
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09,
0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe,
0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04,
0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00,
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09,
0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe,
0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00,
0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00,
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00,
0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe,
0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00,
0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04,
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09,
0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe,
0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00,
0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04,
0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00,
0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09,
0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00,
0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04,
0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00,
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09,
0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe,
0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04,
0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00,
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09,
0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe,
0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00,
0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00,
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00,
0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe,
0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00,
0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04,
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09,
0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe,
0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00,
0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04,
0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00,
0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09,
0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00,
0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04,
0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00,
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09,
0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe,
0x00, 0xfe, 0x01, 0x02, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
};
const unsigned short port4_device_descriptor[] = {
0x12, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08,
0xAA, 0xAA, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00,
0x00, 0x03,
};
const unsigned short port4_config_descriptor_1[] = {
// config
0x09, 0x02, 0x12, 0x00, 0x01, 0x01, 0x00, 0x80,
0x01,
// interface
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x00,
};
const unsigned short port4_short_config_descriptor_2[] = {
// config
0x09, 0x02, 0x12, 0x00, 0x01, 0x01, 0x00, 0x80,
};
const unsigned short port4_config_descriptor_2[] = {
// config
0x09, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x80,
0x01,
// interface
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x00,
};
const unsigned short port4_config_descriptor_3[] = {
0x09, 0x02, 0x30, 0x00, 0x01, 0x01, 0x00, 0x80, 0x01, 0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01,
0x02, 0x00, 0x3e, 0x21, 0x00, 0x00, 0x00, 0x00, 0xfa, 0xce, 0xb0, 0x03, 0xaa, 0xbb, 0xcc, 0xdd,
0x80, 0x00, 0x00, 0x00, 0x00, 0x46, 0x50, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3d, 0xee, 0x70,
};
const unsigned short port5_device_descriptor[] = {
0x12, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08,
0x4c, 0x05, 0xeb, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01,
};
const unsigned short port5_config_descriptor[] = {
// config
0x09, 0x02, 0x20, 0x00, 0x01, 0x00, 0x00, 0x80,
0x01,
// interface
0x09, 0x04, 0x00, 0x00, 0x02, 0xff, 0x00, 0x00,
0x00,
// endpoint
0x07, 0x05, 0x02, 0x02, 0x08, 0x00, 0x00,
// endpoint
0x07, 0x05, 0x81, 0x02, 0x08, 0x00, 0x00,
};
const unsigned short port6_device_descriptor[] = {
0x12, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08,
0xaa, 0xaa, 0xc0, 0xde, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01,
};
const unsigned short port6_config_descriptor[] = {
// config
0x09, 0x02, 0x12, 0x00, 0x01, 0x01, 0x00, 0x80,
0x01,
// interface
0x09, 0x04, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x02,
0x00,
};
Código principal:
Spoiler:
Código: Seleccionar todo
#include <pspkernel.h>
#include <pspsdk.h>
#include <pspusb.h>
#include <pspusbbus.h>
#include <string.h>
#include "descriptors.h"
#include "psgroove.h"
#define PSGROOVE_DRIVERNAME "PsGrooveDriver"
#define PSGROOVE_DRIVERPID (0x1C9)
/*------------------------------------------------------------------------------*/
/* USB driver define */
/*------------------------------------------------------------------------------*/
enum UsbEvents {
USB_EVENT_ATTACH = 1,
USB_EVENT_DETACH = 2,
USB_EVENT_ASYNC = 4,
USB_EVENT_CONNECT = 8,
USB_EVENT_ALL = 0xFFFFFFFF
};
enum UsbTransEvents {
USB_TRANSEVENT_BULKOUT_DONE = 1,
USB_TRANSEVENT_BULKIN_DONE = 2,
};
/*------------------------------------------------------------------------------*/
/* USB HUB device descriptor */
/*------------------------------------------------------------------------------*/
struct DeviceDescriptor devdesc_hub = {
.bLength = 0x12,
.bDescriptorType = 0x01,
.bcdUSB = 0x0002, //? 0x0200
.bDeviceClass = 0x09,
.bDeviceSubClass = 0x00,
.bDeviceProtocol = 0x01,
.bMaxPacketSize = 0x08,
.idVendor = 0xAAAA,
.idProduct = 0xCCCC,
.bcdDevice = 0x0001, //? 0x0100
.iManufacturer = 0x00,
.iProduct = 0x00,
.iSerialNumber = 0x00,
.bNumConfigurations = 0x01
};
/*------------------------------------------------------------------------------*/
/* USB HUB configuration descriptor */
/*------------------------------------------------------------------------------*/
struct ConfigDescriptor confdesc_hub = {
.bLength = 0x09,
.bDescriptorType = 0x02,
.wTotalLength = 0x1900, //? 0x0019
.bNumInterfaces = 0x01,
.bConfigurationValue = 0x01,
.iConfiguration = 0x00,
.bmAttributes = 0xE0,
.bMaxPower = 0x32
};
/*------------------------------------------------------------------------------*/
/* USB HUB interface descriptor */
/*------------------------------------------------------------------------------*/
struct InterfaceDescriptor interdesc_hub = {
.bLength = 0x09,
.bDescriptorType = 0x04,
.bInterfaceNumber = 0x00,
.bAlternateSetting = 0x00,
.bNumEndpoints = 0x01,
.bInterfaceClass = 0x09,
.bInterfaceSubClass = 0x00,
.bInterfaceProtocol = 0x00,
.iInterface = 0x00
};
/*------------------------------------------------------------------------------*/
/* USB HUB endpoint descriptor */
/*------------------------------------------------------------------------------*/
struct EndpointDescriptor endpdesc_hub = {
.bLength = 0x07,
.bDescriptorType = 0x05,
.bEndpointAddress = 0x81,
.bmAttributes = 0x03,
.wMaxPacketSize = 0x100,
.bInterval = 0x0C
};
/*------------------------------------------------------------------------------*/
/* USB HUB string description */
/*------------------------------------------------------------------------------*/
static struct StringDescriptor HUBStringDescriptor = { 0x09, 0x29, {0x06, 0xA9, 0x00, 0x32, 0x64, 0x00, 0xff} };
/*------------------------------------------------------------------------------*/
/* USB driver work */
/*------------------------------------------------------------------------------*/
static struct UsbEndpoint UsbEndpoint[3] = { {0,0,0}, {1,0,0}, {2,0,0} };
static struct UsbInterface UsbInterface = { 0xFFFFFFFF, 0, 1, }; //I don't know what is this
static struct UsbData UsbData[2];
static SceUID UsbMainEventFlag = -1;
static SceUID UsbTransEventFlag = -1;
static SceUID UsbMainSemaphore = -1;
static SceUID UsbMainThreadID = -1;
/*------------------------------------------------------------------------------*/
/* Pre declarations */
/*------------------------------------------------------------------------------*/
static int UsbMainThread( SceSize size, void *argp );
unsigned short PsGroove_GetDescription(unsigned char DescriptorType, unsigned char DescriptorNumber, unsigned short wLength, const void** const DescriptorAddress)
void PsGroove_UnhandledControlRequest(struct DeviceRequest USB_ControlRequest);
/*------------------------------------------------------------------------------*/
/* UsbRequest */
/*------------------------------------------------------------------------------*/
static int UsbRequest( int arg1, int arg2, struct DeviceRequest *req )
{
unsigned char DescriptorType = (req->wValue >> 8)
unsigned char DescriptorNumber = ((req->wValue && 0xFF)
unsigned short wLength = req->wLength;
void* DataAddress = NULL;
unsigned short size = 0;
if (req->bRequest == 0x06) {//GetDescriptor Request
if ( (size = psgroove_getDescription(DescriptorType, DescriptorNumber, wLength, &DataAddress)) > 0 )
if (UsbWriteData(DataAddress, size) < size)
return -1;
}
else { //Other request
PsGroove_UnhandledControlRequest(*req);
}
return( 0 );
}
/*------------------------------------------------------------------------------*/
/* UsbUnknown */
/*------------------------------------------------------------------------------*/
static int UsbUnknown( int arg1, int arg2, int arg3 )
{
return( 0 );
}
/*------------------------------------------------------------------------------*/
/* UsbAttach */
/*------------------------------------------------------------------------------*/
static int UsbAttach( int speed, void *arg2, void *arg3 )
{
sceKernelSetEventFlag( UsbMainEventFlag, USB_EVENT_ATTACH );
return( 0 );
}
/*------------------------------------------------------------------------------*/
/* UsbDetach */
/*------------------------------------------------------------------------------*/
static int UsbDetach( int arg1, int arg2, int arg3 )
{
DisplayEnable();
sceKernelSetEventFlag( UsbMainEventFlag, USB_EVENT_DETACH );
return( 0 );
}
/*------------------------------------------------------------------------------*/
/* UsbStartFunc */
/*------------------------------------------------------------------------------*/
static int UsbStartFunc( int size, void *p )
{
memset( UsbData, 0, sizeof(UsbData) );
memcpy( UsbData[0].devdesc, &devdesc_hub, sizeof(devdesc_hub) );
UsbData[0].config.pconfdesc = &UsbData[0].confdesc;
UsbData[0].config.pinterfaces = &UsbData[0].interfaces;
UsbData[0].config.pinterdesc = &UsbData[0].interdesc;
UsbData[0].config.pendp = &UsbData[0].endp[0];
memcpy( UsbData[0].confdesc.desc, &confdesc_hub, sizeof(confdesc_hub) );
UsbData[0].confdesc.pinterfaces = &UsbData[0].interfaces;
UsbData[0].interfaces.pinterdesc[0] = &UsbData[0].interdesc;
UsbData[0].interfaces.intcount = 1;
memcpy( UsbData[0].interdesc.desc, &interdesc_hub, sizeof(interdesc_hub) );
UsbData[0].interdesc.pendp = &UsbData[0].endp[0];
memcpy( UsbData[0].endp[0].desc, &endpdesc_hhub, sizeof(endpdesc_hub) );
//memcpy( UsbData[0].endp[1].desc, &endpdesc_hi[1], sizeof(endpdesc_hub[1]) );
//memcpy( UsbData[0].endp[2].desc, &endpdesc_hi[2], sizeof(endpdesc_hub[2]) );
memcpy( UsbData[1].devdesc, &devdesc_hub, sizeof(devdesc_hub) );
UsbData[1].config.pconfdesc = &UsbData[0].confdesc;
UsbData[1].config.pinterfaces = &UsbData[0].interfaces;
UsbData[1].config.pinterdesc = &UsbData[0].interdesc;
UsbData[1].config.pendp = &UsbData[0].endp[0];
memcpy( UsbData[1].confdesc.desc, &confdesc_hub, sizeof(confdesc_hub) );
UsbData[1].confdesc.pinterfaces = &UsbData[0].interfaces;
UsbData[1].interfaces.pinterdesc[0] = &UsbData[0].interdesc;
UsbData[1].interfaces.intcount = 1;
memcpy( UsbData[1].interdesc.desc, &interdesc_hub, sizeof(interdesc_hub) );
UsbData[1].interdesc.pendp = &UsbData[0].endp[0];
memcpy( UsbData[1].endp[0].desc, &endpdesc_hhub, sizeof(endpdesc_hub) );
//memcpy( UsbData[1].endp[1].desc, &endpdesc_hi[1], sizeof(endpdesc_hub[1]) );
//memcpy( UsbData[1].endp[2].desc, &endpdesc_hi[2], sizeof(endpdesc_hub[2]) );
UsbMainEventFlag = sceKernelCreateEventFlag( "USBMainEvent", 0x200, 0, NULL );
if ( UsbMainEventFlag < 0 ){ return( -1 ); }
UsbTransEventFlag = sceKernelCreateEventFlag( "USBEventTrans", 0x200, 0, NULL );
if ( UsbTransEventFlag < 0 ){ return( -1 ); }
UsbMainSemaphore = sceKernelCreateSema( "USBSemaphore", 0, 1, 1, NULL );
if ( UsbMainSemaphore < 0 ){ return( -1 ); }
UsbMainThreadID = sceKernelCreateThread( "USBMainThread", UsbMainThread, 10, 0x10000, 0, NULL );
if ( UsbMainThreadID < 0 ){ return( -1 ); }
sceKernelStartThread( UsbMainThreadID, 0, NULL );
return( 0 );
}
/*------------------------------------------------------------------------------*/
/* UsbStopFunc */
/*------------------------------------------------------------------------------*/
static int UsbStopFunc( int size, void *p )
{
if ( UsbMainThreadID >= 0 ){ sceKernelTerminateDeleteThread( UsbMainThreadID ); }
UsbMainThreadID = -1;
if ( UsbMainEventFlag >= 0 ){ sceKernelDeleteEventFlag( UsbMainEventFlag ); }
UsbMainEventFlag = -1;
if ( UsbTransEventFlag >= 0 ){ sceKernelDeleteEventFlag( UsbTransEventFlag ); }
UsbTransEventFlag = -1;
if ( UsbMainSemaphore >= 0 ){ sceKernelDeleteSema( UsbMainSemaphore ); }
UsbMainSemaphore = -1;
return( 0 );
}
/*------------------------------------------------------------------------------*/
/* USB driver structure */
/*------------------------------------------------------------------------------*/
struct UsbDriver UsbDriver = {
PSGROOVE_DRIVERNAME,
4,
UsbEndpoint,
&UsbInterface,
&UsbData[0].devdesc[0],
&UsbData[0].config,
&UsbData[1].devdesc[0],
&UsbData[1].config,
&StringDescriptor,
UsbRequest,
UsbUnknown,
UsbAttach,
UsbDetach,
0,
UsbStartFunc,
UsbStopFunc,
NULL
};
/********************************************************************************/
/*------------------------------------------------------------------------------*/
/* usb thread work */
/*------------------------------------------------------------------------------*/
static int UsbReady = 0;
static struct UsbdDeviceReq UsbBulkinReq;
static struct UsbdDeviceReq UsbBulkoutReq;
static char UsbBuff[64*1024] __attribute__((aligned(64)));
static char UsbAsyncBuff[512] __attribute__((aligned(64)));
/*------------------------------------------------------------------------------*/
/* UsbBulkinReqDone */
/*------------------------------------------------------------------------------*/
static int UsbBulkinReqDone( struct UsbdDeviceReq *req, int arg2, int arg3 )
{
sceKernelSetEventFlag( UsbTransEventFlag, USB_TRANSEVENT_BULKIN_DONE );
return( 0 );
}
/*------------------------------------------------------------------------------*/
/* SetUsbBulkinReq */
/*------------------------------------------------------------------------------*/
static int SetUsbBulkinReq( void *data, int size )
{
sceKernelDcacheWritebackRange( data, size );
memset( &UsbBulkinReq, 0, sizeof(UsbBulkinReq) );
UsbBulkinReq.endp = &UsbEndpoint[1];
UsbBulkinReq.data = data;
UsbBulkinReq.size = size;
UsbBulkinReq.func = UsbBulkinReqDone;
sceKernelClearEventFlag( UsbTransEventFlag, ~USB_TRANSEVENT_BULKIN_DONE );
return( sceUsbbdReqSend( &UsbBulkinReq ) );
}
/*------------------------------------------------------------------------------*/
/* UsbBulkoutReqDone */
/*------------------------------------------------------------------------------*/
static int UsbBulkoutReqDone( struct UsbdDeviceReq *req, int arg2, int arg3 )
{
sceKernelSetEventFlag( UsbTransEventFlag, USB_TRANSEVENT_BULKOUT_DONE );
return( 0 );
}
/*------------------------------------------------------------------------------*/
/* SetUsbBulkoutReq */
/*------------------------------------------------------------------------------*/
static int SetUsbBulkoutReq( void *data, int size )
{
u32 upper_size = (size + 0x3F) & 0xFFFFFFC0;
sceKernelDcacheInvalidateRange( data, upper_size );
memset( &UsbBulkoutReq, 0, sizeof(UsbBulkoutReq) );
UsbBulkoutReq.endp = &UsbEndpoint[2];
UsbBulkoutReq.data = data;
UsbBulkoutReq.size = size;
UsbBulkoutReq.func = UsbBulkoutReqDone;
sceKernelClearEventFlag( UsbTransEventFlag, ~USB_TRANSEVENT_BULKOUT_DONE );
return( sceUsbbdReqRecv( &UsbBulkoutReq ) );
}
/*------------------------------------------------------------------------------*/
/* UsbReadData */
/*------------------------------------------------------------------------------*/
static int UsbReadData( void *data, int data_size )
{
u32 result;
int read_size = 0;
while ( read_size < data_size ){
int rest_size = data_size - read_size;
if ( rest_size > sizeof(UsbBuff) ){ rest_size = sizeof(UsbBuff); }
SetUsbBulkoutReq( UsbBuff, rest_size );
int ret = sceKernelWaitEventFlag( UsbTransEventFlag, USB_TRANSEVENT_BULKOUT_DONE,
PSP_EVENT_WAITOR | PSP_EVENT_WAITCLEAR, &result, NULL );
if ( ret == 0 ){
if ( (UsbBulkoutReq.retcode == 0) && (UsbBulkoutReq.recvsize > 0) ){
read_size += UsbBulkoutReq.recvsize;
memcpy( data, UsbBuff, UsbBulkoutReq.recvsize );
data += UsbBulkoutReq.recvsize;
} else {
return( -1 );
}
} else {
return( -1 );
}
}
return( read_size );
}
/*------------------------------------------------------------------------------*/
/* UsbWriteData */
/*------------------------------------------------------------------------------*/
static int UsbWriteData( const void *data, int data_size )
{
u32 result;
int write_size = 0;
if ( (u32)data & 0x3F ){
while ( write_size < data_size ){
int rest_size = data_size - write_size;
if ( rest_size > sizeof(UsbBuff) ){ rest_size = sizeof(UsbBuff); }
memcpy( UsbBuff, data, rest_size );
SetUsbBulkinReq( UsbBuff, rest_size );
int ret = sceKernelWaitEventFlag( UsbTransEventFlag, USB_TRANSEVENT_BULKIN_DONE,
PSP_EVENT_WAITOR | PSP_EVENT_WAITCLEAR, &result, NULL );
if ( ret == 0 ){
if ( (UsbBulkinReq.retcode == 0) && (UsbBulkinReq.recvsize > 0) ){
write_size += UsbBulkinReq.recvsize;
data += UsbBulkinReq.recvsize;
} else {
return( -1 );
}
} else {
return( -1 );
}
}
} else {
while ( write_size < data_size ){
int rest_size = data_size - write_size;
if ( rest_size > sizeof(UsbBuff) ){ rest_size = sizeof(UsbBuff); }
SetUsbBulkinReq( (char *)data, rest_size );
int ret = sceKernelWaitEventFlag( UsbTransEventFlag, USB_TRANSEVENT_BULKIN_DONE,
PSP_EVENT_WAITOR | PSP_EVENT_WAITCLEAR, &result, NULL );
if ( ret == 0 ){
if ( (UsbBulkinReq.retcode == 0) && (UsbBulkinReq.recvsize > 0) ){
write_size += UsbBulkinReq.recvsize;
data += UsbBulkinReq.recvsize;
} else {
return( -1 );
}
} else {
return( -1 );
}
}
}
return( write_size );
}
/*------------------------------------------------------------------------------*/
/* UsbMainThread */
/*------------------------------------------------------------------------------*/
static int UsbMainThread( SceSize size, void *argp )
{
int ret;
u32 result;
while( 1 ){
ret = sceKernelWaitEventFlag( UsbMainEventFlag,
USB_EVENT_ATTACH | USB_EVENT_DETACH | USB_EVENT_ASYNC,
PSP_EVENT_WAITOR | PSP_EVENT_WAITCLEAR, &result, NULL );
if ( ret < 0 ){ sceKernelExitDeleteThread( 0 ); }
if ( result & USB_EVENT_DETACH ){
UsbReady = 0;
sceKernelClearEventFlag( UsbMainEventFlag, ~USB_EVENT_CONNECT );
}
if ( result & USB_EVENT_ATTACH ){
UsbReady = 0;
sceKernelClearEventFlag( UsbMainEventFlag, ~USB_EVENT_CONNECT );
}
}
return( 0 );
}
/********************************************************************************/
/*------------------------------------------------------------------------------*/
/* UsbbdRegister */
/*------------------------------------------------------------------------------*/
void UsbbdRegister( void )
{
sceUsbbdRegister( &UsbDriver );
}
/*------------------------------------------------------------------------------*/
/* UsbbdUnregister */
/*------------------------------------------------------------------------------*/
void UsbbdUnregister( void )
{
sceUsbbdUnregister( &UsbDriver );
}
/*------------------------------------------------------------------------------*/
/* UsbStart */
/*------------------------------------------------------------------------------*/
int UsbStart( void )
{
int ret;
ret = sceUsbStart( PSP_USBBUS_DRIVERNAME, 0, 0 );
if ( ret != 0 ){ return( -1 ); }
ret = sceUsbStart( PSGROOVE_DRIVERNAME, 0, 0 );
if ( ret != 0 ){ return( -1 ); }
ret = sceUsbActivate( PSGROOVE_DRIVERPID );
if ( ret != 0 ){ return( -1 ); }
//TODO: Check if it is the right place
PsGroove_Start();
return( 0 );
}
/*------------------------------------------------------------------------------*/
/* UsbStop */
/*------------------------------------------------------------------------------*/
int UsbStop( void )
{
int ret;
ret = sceUsbDeactivate( PSGROOVE_DRIVERPID );
if ( ret != 0 ){ return( -1 ); }
ret = sceUsbStop( PSGROOVE_DRIVERNAME, 0, 0 );
if ( ret != 0 ){ return( -1 ); }
ret = sceUsbStop( PSP_USBBUS_DRIVERNAME, 0, 0 );
if ( ret != 0 ){ return( -1 ); }
return( 0 );
}
/*------------------------------------------------------------------------------*/
/* UsbResume */
/*------------------------------------------------------------------------------*/
int UsbResume( void )
{
int ret;
ret = sceUsbActivate( PSGROOVE_DRIVERPID );
if ( ret != 0 ){ return( -1 ); }
return( 0 );
}
/*------------------------------------------------------------------------------*/
/* UsbSuspend */
/*------------------------------------------------------------------------------*/
int UsbSuspend( void )
{
int ret;
ret = sceUsbDeactivate( PSGROOVE_DRIVERPID );
if ( ret != 0 ){ return( -1 ); }
return( 0 );
}
/*------------------------------------------------------------------------------*/
/* UsbWait */
/*------------------------------------------------------------------------------*/
int UsbWait( void )
{
int ret;
while ( UsbMainEventFlag < 0 ){ sceKernelDelayThread( 100000 ); }
ret = sceKernelWaitEventFlag( UsbMainEventFlag, USB_EVENT_CONNECT,
PSP_EVENT_WAITOR, NULL, NULL );
return( 0 );
}
Emulación casi total de los 6 puertos del PsGroove:
Spoiler:
Código: Seleccionar todo
/********************************************************************************/
/*------------------------------------------------------------------------------*/
/* PsGroove Emulation */
/*------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------*/
#define PORT_EMPTY 0x0100 /* powered only */
#define PORT_FULL 0x0103 /* connected, enabled, powered, full-speed */
#define C_PORT_CONN 0x0001 /* connection */
#define C_PORT_RESET 0x0010 /* reset */
#define C_PORT_NONE 0x0000 /* no change */
unsigned short port_status[6] = { PORT_EMPTY, PORT_EMPTY, PORT_EMPTY, PORT_EMPTY, PORT_EMPTY, PORT_EMPTY };
unsigned short port_change[6] = { C_PORT_NONE, C_PORT_NONE, C_PORT_NONE, C_PORT_NONE, C_PORT_NONE, C_PORT_NONE };
enum {
init,
wait_hub_ready,
hub_ready,
p1_wait_reset,
p1_wait_enumerate,
p1_ready,
p2_wait_reset,
p2_wait_enumerate,
p2_ready,
p3_wait_reset,
p3_wait_enumerate,
p3_ready,
p2_wait_disconnect,
p4_wait_connect,
p4_wait_reset,
p4_wait_enumerate,
p4_ready,
p5_wait_reset,
p5_wait_enumerate,
p5_challenged,
p5_responded,
p3_wait_disconnect,
p3_disconnected,
p5_wait_disconnect,
p5_disconnected,
p4_wait_disconnect,
p4_disconnected,
p1_wait_disconnect,
p1_disconnected,
p6_wait_reset,
p6_wait_enumerate,
done,
} state = init;
unsigned char hub_int_response = 0x00;
unsigned char hub_int_force_data0 = 0;
int last_port_conn_clear = 0;
int last_port_reset_clear = 0;
unsigned char port_addr[7] = { -1, -1, -1, -1, -1, -1, -1 };
unsigned char port_cur = -1;
/*------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------*/
/*PsGroove_Timer */
/*------------------------------------------------------------------------------*/
volatile unsigned char expire = 0; /* counts down every 10 milliseconds */
void PsGroove_Timer( void )
{
if (expire > 0)
expire--;
}
/*------------------------------------------------------------------------------*/
/*PsGroove_Panic */
/*------------------------------------------------------------------------------*/
void PsGroove_Panic()
{
//TODO: Don't Panic!
}
/*------------------------------------------------------------------------------*/
/*PsGroove_PsGroove_Switch_Port */
/*------------------------------------------------------------------------------*/
void PsGroove_PsGroove_Switch_Port(int8_t port)
{
if (port_cur == port) return;
port_cur = port;
if (port_addr[port] < 0)
port_addr[port] = 0;
//TODO: I can't port this two lines
//UDADDR = port_addr[port] & 0x7f;
//UDADDR |= (1 << ADDEN);
}
/*------------------------------------------------------------------------------*/
/*PsGroove_PsGroove_Connect_Port */
/*------------------------------------------------------------------------------*/
void PsGroove_PsGroove_Connect_Port(int port)
{
last_port_reset_clear = 0;
hub_int_response = (1 << port);
port_status[port - 1] = PORT_FULL;
port_change[port - 1] = C_PORT_CONN;
}
/*------------------------------------------------------------------------------*/
/*PsGroove_PsGroove_Disconnect_Port */
/*------------------------------------------------------------------------------*/
void PsGroove_PsGroove_Disconnect_Port(int port)
{
last_port_conn_clear = 0;
hub_int_response = (1 << port);
port_status[port - 1] = PORT_EMPTY;
port_change[port - 1] = C_PORT_CONN;
}
/*------------------------------------------------------------------------------*/
/*PsGroove_GetDescription */
/*------------------------------------------------------------------------------*/
unsigned short PsGroove_GetDescription(unsigned char DescriptorType, unsigned char DescriptorNumber, unsigned short wLength, const void** const DescriptorAddress)
{
void* Address = NULL;
unsigned short Size = 0;
switch(DescriptorType)
{
case 0x01: //DTYPE_Device
switch (port_cur) {
//case 0:
// Address = (void *) HUB_Device_Descriptor;
// Size = sizeof(HUB_Device_Descriptor);
// break;
case 1:
Address = (void *) port1_device_descriptor;
Size = sizeof(port1_device_descriptor);
break;
case 2:
Address = (void *) port2_device_descriptor;
Size = sizeof(port2_device_descriptor);
break;
case 3:
Address = (void *) port3_device_descriptor;
Size = sizeof(port3_device_descriptor);
break;
case 4:
Address = (void *) port4_device_descriptor;
Size = sizeof(port4_device_descriptor);
break;
case 5:
Address = (void *) port5_device_descriptor;
Size = sizeof(port5_device_descriptor);
break;
case 6:
Address = (void *) port6_device_descriptor;
Size = sizeof(port6_device_descriptor);
break;
}
break;
case 0x02: //DTYPE_Configuration
switch (port_cur) {
//case 0:
// Address = (void *) HUB_Config_Descriptor;
// Size = sizeof(HUB_Config_Descriptor);
// break;
case 1:
// 4 configurations are the same.
// For the initial 8-byte request, we give a different
// length response than in the full request.
if (DescriptorNumber < 4) {
if (wLength == 8) {
Address = (void *) port1_short_config_descriptor;
Size = sizeof(port1_short_config_descriptor);
} else {
Address = (void *) port1_config_descriptor;
Size = sizeof(port1_config_descriptor);
}
if (DescriptorNumber == 3 && wLength > 8) {
state = p1_ready;
expire = 10;
}
}
break;
case 2:
// only 1 config
Address = (void *) port2_config_descriptor;
Size = sizeof(port2_config_descriptor);
state = p2_ready;
expire = 15;
break;
case 3:
// 2 configurations are the same
Address = (void *) port3_config_descriptor;
Size = sizeof(port3_config_descriptor);
if (DescriptorNumber == 1 && wLength > 8) {
state = p3_ready;
expire = 10;
}
break;
case 4:
// 3 configurations
if (DescriptorNumber == 0) {
Address = (void *) port4_config_descriptor_1;
Size = sizeof(port4_config_descriptor_1);
} else if (DescriptorNumber == 1) {
if (wLength == 8) {
Address = (void *) port4_short_config_descriptor_2;
Size = sizeof(port4_short_config_descriptor_2);
} else {
Address = (void *) port4_config_descriptor_2;
Size = sizeof(port4_config_descriptor_2);
}
} else if (DescriptorNumber == 2) {
Address = (void *) port4_config_descriptor_3;
Size = sizeof(port4_config_descriptor_3);
if (wLength > 8) {
state = p4_ready;
expire = 20; // longer seems to help this one?
}
}
break;
case 5:
// 1 config
Address = (void *) port5_config_descriptor;
Size = sizeof(port5_config_descriptor);
break;
case 6:
// 1 config
Address = (void *) port6_config_descriptor;
Size = sizeof(port6_config_descriptor);
break;
}
break;
//case 0x29: // HUB descriptor (always to port 0 we'll assume)
// switch (port_cur) {
// case 0:
// Address = (void *) HUB_Hub_Descriptor;
// Size = sizeof(HUB_Hub_Descriptor);
// break;
}
break;
}
}
/*------------------------------------------------------------------------------*/
/*PsGroove_UnhandledControlRequest */
/*------------------------------------------------------------------------------*/
void PsGroove_UnhandledControlRequest(struct DeviceRequest USB_ControlRequest)
{
if (port_cur == 6 && USB_ControlRequest.bRequest == 0xAA) {
/* holy crap, it worked! */
//Endpoint_ClearSETUP();
//Endpoint_ClearIN();
//Endpoint_ClearStatusStage();
state = done;
return;
}
if (port_cur == 5 && USB_ControlRequest.bRequest == 11 /*REQ_SetInterface*/)
{
/* can ignore this */
//Endpoint_ClearSETUP();
//Endpoint_ClearIN();
//Endpoint_ClearStatusStage();
return;
}
if (port_cur == 0 &&
USB_ControlRequest.bmRequestType == 0xA0 &&
USB_ControlRequest.bRequest == 0x00 && // GET HUB STATUS
USB_ControlRequest.wValue == 0x00 &&
USB_ControlRequest.wIndex == 0x00 &&
USB_ControlRequest.wLength == 0x04) {
//Endpoint_ClearSETUP();
//Endpoint_Write_Word_LE(0x0000); // wHubStatus
//Endpoint_Write_Word_LE(0x0000); // wHubChange
//Endpoint_ClearIN();
//Endpoint_ClearStatusStage();
unsigned short* Empty = {0x0000, 0x0000};
UsbWriteData(Empty, 4); // wHubStatus, wHubChange
return;
}
if (port_cur == 0 &&
USB_ControlRequest.bmRequestType == 0xA3 &&
USB_ControlRequest.bRequest == 0x00 && // GET PORT STATUS
USB_ControlRequest.wValue == 0x00 &&
USB_ControlRequest.wLength == 0x04) {
unsigned char p = USB_ControlRequest.wIndex;
if (p < 1 || p > 6) return;
//Endpoint_ClearSETUP();
//Endpoint_Write_Word_LE(port_status[p - 1]); // wHubStatus
//Endpoint_Write_Word_LE(port_change[p - 1]); // wHubChange
//Endpoint_ClearIN();
//Endpoint_ClearStatusStage();
unsigned char* Package = {port_status[p - 1], port_status[p], port_change[p - 1], port_change[p]};
UsbWriteData(Package, 4); // wHubStatus, wHubChange
return;
}
if (port_cur == 0 &&
USB_ControlRequest.bmRequestType == 0x23 &&
USB_ControlRequest.bRequest == 0x03 && // SET_FEATURE
USB_ControlRequest.wLength == 0x00) {
unsigned char p = USB_ControlRequest.wIndex;
if (p < 1 || p > 6) return;
//Endpoint_ClearSETUP();
//Endpoint_ClearIN();
//Endpoint_ClearStatusStage();
switch(USB_ControlRequest.wValue) {
case 0x0008: // PORT_POWER
if (p == 6 && state == init) {
/* after the 6th port is powered, wait a bit and continue */
state = hub_ready;
expire = 15;
}
break;
case 0x0004: // PORT_RESET
hub_int_response = (1 << p);
port_change[p - 1] |= C_PORT_RESET;
break;
}
return;
}
if (port_cur == 0 &&
USB_ControlRequest.bmRequestType == 0x23 &&
USB_ControlRequest.bRequest == 0x01 && // CLEAR_FEATURE
USB_ControlRequest.wLength == 0x00) {
unsigned char p = USB_ControlRequest.wIndex;
if (p < 1 || p > 6) return;
//Endpoint_ClearSETUP();
//Endpoint_ClearIN();
//Endpoint_ClearStatusStage();
switch(USB_ControlRequest.wValue) {
case 0x0010: // C_PORT_CONNECTION
port_change[p - 1] &= ~C_PORT_CONN;
last_port_conn_clear = p;
break;
case 0x0014: // C_PORT_RESET
port_change[p - 1] &= ~C_PORT_RESET;
last_port_reset_clear = p;
break;
}
return;
}
PsGroove_Panic();
}
/*------------------------------------------------------------------------------*/
/*PsGroove_JIG_Task */
/*------------------------------------------------------------------------------*/
const unsigned char jig_response[64] = {
0x80, 0x00, 0x00, 0x00, 0x00, 0x3d, 0xee, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3d, 0xee, 0x88,
0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0xe7, 0x20, 0xe8, 0x83, 0xff, 0xf0, 0xe8, 0x63, 0xff, 0xf8,
0xe8, 0xa3, 0x00, 0x18, 0x38, 0x63, 0x10, 0x00, 0x7c, 0x04, 0x28, 0x00, 0x40, 0x82, 0xff, 0xf4,
0x38, 0xc3, 0xf0, 0x20, 0x7c, 0xc9, 0x03, 0xa6, 0x4e, 0x80, 0x04, 0x20, 0x04, 0x00, 0x00, 0x00,
};
void PsGroove_JIG_Task(void)
{
static int bytes_out = 0, bytes_in = 0;
unsigned char buffer[0x100];
//Endpoint_Discard_Stream(8, NO_STREAM_CALLBACK);
UsbReadData(buffer, 8);
bytes_out += 8;
if (bytes_out >= 64)
{
state = p5_challenged;
expire = 50; // was 90
}
if (state == p5_challenged && expire == 0)
{
if (bytes_in < 64) {
UsbWriteData(&jig_response[bytes_in], 8);
bytes_in += 8;
if (bytes_in >= 64) {
state = p5_responded;
expire = 15;
}
}
}
}
/*------------------------------------------------------------------------------*/
/*PsGroove_Start */
/*------------------------------------------------------------------------------*/
void PsGroove_Start()
{
//TODO: start the timer.... (PsGroove_Timer each 10 ms.)
state = init;
PsGroove_PsGroove_Switch_Port(0);
for (;;)
{
/*if (port_cur == 0)
HUB_Task();*/
if (port_cur == 5)
PsGroove_JIG_Task();
// connect 1
if (state == hub_ready && expire == 0)
{
PsGroove_Connect_Port(1);
state = p1_wait_reset;
}
if (state == p1_wait_reset && last_port_reset_clear == 1)
{
PsGroove_Switch_Port(1);
state = p1_wait_enumerate;
}
// connect 2
if (state == p1_ready && expire == 0)
{
PsGroove_Switch_Port(0);
PsGroove_Connect_Port(2);
state = p2_wait_reset;
}
if (state == p2_wait_reset && last_port_reset_clear == 2)
{
PsGroove_Switch_Port(2);
state = p2_wait_enumerate;
}
// connect 3
if (state == p2_ready && expire == 0)
{
PsGroove_Switch_Port(0);
PsGroove_Connect_Port(3);
state = p3_wait_reset;
}
if (state == p3_wait_reset && last_port_reset_clear == 3)
{
PsGroove_Switch_Port(3);
state = p3_wait_enumerate;
}
// disconnect 2
if (state == p3_ready && expire == 0)
{
PsGroove_Switch_Port(0);
PsGroove_Disconnect_Port(2);
state = p2_wait_disconnect;
}
if (state == p2_wait_disconnect && last_port_conn_clear == 2)
{
state = p4_wait_connect;
expire = 15;
}
// connect 4
if (state == p4_wait_connect && expire == 0)
{
PsGroove_Connect_Port(4);
state = p4_wait_reset;
}
if (state == p4_wait_reset && last_port_reset_clear == 4)
{
PsGroove_Switch_Port(4);
state = p4_wait_enumerate;
}
// connect 5
if (state == p4_ready && expire == 0)
{
PsGroove_Switch_Port(0);
/* When first connecting port 5, we need to
have the wrong data toggle for the PS3 to
respond */
hub_int_force_data0 = 1;
PsGroove_Connect_Port(5);
state = p5_wait_reset;
}
if (state == p5_wait_reset && last_port_reset_clear == 5)
{
PsGroove_Switch_Port(5);
state = p5_wait_enumerate;
}
// disconnect 3
if (state == p5_responded && expire == 0)
{
PsGroove_Switch_Port(0);
/* Need wrong data toggle again */
hub_int_force_data0 = 1;
PsGroove_Disconnect_Port(3);
state = p3_wait_disconnect;
}
if (state == p3_wait_disconnect && last_port_conn_clear == 3)
{
state = p3_disconnected;
expire = 45;
}
// disconnect 5
if (state == p3_disconnected && expire == 0)
{
PsGroove_Switch_Port(0);
PsGroove_Disconnect_Port(5);
state = p5_wait_disconnect;
}
if (state == p5_wait_disconnect && last_port_conn_clear == 5)
{
state = p5_disconnected;
expire = 20;
}
// disconnect 4
if (state == p5_disconnected && expire == 0)
{
PsGroove_Switch_Port(0);
PsGroove_Disconnect_Port(4);
state = p4_wait_disconnect;
}
if (state == p4_wait_disconnect && last_port_conn_clear == 4)
{
state = p4_disconnected;
expire = 20;
}
// disconnect 1
if (state == p4_disconnected && expire == 0)
{
PsGroove_Switch_Port(0);
PsGroove_Disconnect_Port(1);
state = p1_wait_disconnect;
}
if (state == p1_wait_disconnect && last_port_conn_clear == 1)
{
state = p1_disconnected;
expire = 20;
}
// connect 6
if (state == p1_disconnected && expire == 0)
{
PsGroove_Switch_Port(0);
PsGroove_Connect_Port(6);
state = p6_wait_reset;
}
if (state == p6_wait_reset && last_port_reset_clear == 6)
{
PsGroove_Switch_Port(6);
state = p6_wait_enumerate;
}
// done
if (state == done)
{
//TODO: Great!
}
}
}
Viene a ser un Driver para PSP en el que se emularía un HUB utilizando el código del PsGroove de Mathieulh. Además está creado a partir del driver de USB del programa de PSP RemoteJoy. Casi emularía los diferentes 6 dispositivos que se usan, aunque existen ciertas partes del código que faltan y que señalizo con el código "//TODO:".
Fuente
Descarga