977 uint16_t cntdn = (uint16_t)len;
978 uint8_t *p = (uint8_t*)pbuf;
998 for (; len; p++, len--)
999 PrintHex<uint8_t > (*p, 0x80);
1005 PrintHex<uint8_t > (data, 0x80);
1012 Notify(PSTR(
"\r\nPush"), 0x80);
1015 Notify(PSTR(
"\r\nPop"), 0x80);
1018 Notify(PSTR(
"\r\nUsage Page"), 0x80);
1021 Notify(PSTR(
"\r\nLogical Min"), 0x80);
1024 Notify(PSTR(
"\r\nLogical Max"), 0x80);
1027 Notify(PSTR(
"\r\nPhysical Min"), 0x80);
1030 Notify(PSTR(
"\r\nPhysical Max"), 0x80);
1033 Notify(PSTR(
"\r\nUnit Exp"), 0x80);
1036 Notify(PSTR(
"\r\nUnit"), 0x80);
1039 Notify(PSTR(
"\r\nReport Size"), 0x80);
1042 Notify(PSTR(
"\r\nReport Count"), 0x80);
1045 Notify(PSTR(
"\r\nReport Id"), 0x80);
1048 Notify(PSTR(
"\r\nUsage"), 0x80);
1051 Notify(PSTR(
"\r\nUsage Min"), 0x80);
1054 Notify(PSTR(
"\r\nUsage Max"), 0x80);
1057 Notify(PSTR(
"\r\nCollection"), 0x80);
1060 Notify(PSTR(
"\r\nEnd Collection"), 0x80);
1063 Notify(PSTR(
"\r\nInput"), 0x80);
1066 Notify(PSTR(
"\r\nOutput"), 0x80);
1069 Notify(PSTR(
"\r\nFeature"), 0x80);
1153 Notify(PSTR(
" Physical"), 0x80);
1156 Notify(PSTR(
" Application"), 0x80);
1159 Notify(PSTR(
" Logical"), 0x80);
1162 Notify(PSTR(
" Report"), 0x80);
1165 Notify(PSTR(
" Named Array"), 0x80);
1168 Notify(PSTR(
" Usage Switch"), 0x80);
1171 Notify(PSTR(
" Usage Modifier"), 0x80);
1174 Notify(PSTR(
" Vendor Defined("), 0x80);
1175 PrintHex<uint8_t > (data, 0x80);
1186 PrintBin<uint8_t > (data, 0x80);
1218 if (page > 0x00 && page < 0x11)
1242 if (page > 0x00 && page < 0x11)
1244 else if (page > 0x7f && page < 0x84)
1246 else if (page > 0x83 && page < 0x8c)
1248 else if (page > 0x8b && page < 0x92)
1250 else if (page > 0xfeff && page <= 0xffff)
1267 Notify(PSTR(
"Btn"), 0x80);
1268 PrintHex<uint16_t > (usage, 0x80);
1269 Notify(PSTR(
"\r\n"), 0x80);
1275 Notify(PSTR(
"Inst"), 0x80);
1277 PrintHex<uint16_t > (usage, 0x80);
1278 Notify(PSTR(
"\r\n"), 0x80);
1285 if (usage > 0x00 && usage < 0x0a)
1287 else if (usage > 0x2f && usage < 0x49)
1289 else if (usage > 0x7f && usage < 0x94)
1291 else if (usage > 0x9f && usage < 0xa9)
1293 else if (usage > 0xaf && usage < 0xb8)
1302 if (usage > 0x00 && usage < 0x0d)
1304 else if (usage > 0x1f && usage < 0x26)
1306 else if (usage > 0xaf && usage < 0xd1)
1315 if (usage > 0x00 && usage < 0x0b)
1317 else if (usage > 0x1f && usage < 0x22)
1326 if (usage > 0x00 && usage < 0x05)
1328 else if (usage > 0x2f && usage < 0x3a)
1330 else if (usage > 0x4f && usage < 0x64)
1339 if (usage > 0x00 && usage < 0x04)
1341 else if (usage > 0x1f && usage < 0x3a)
1350 if (usage > 0x1f && usage < 0x27)
1359 if (usage > 0x00 && usage < 0x4e)
1368 if (usage > 0x00 && usage < 0x08)
1370 else if (usage > 0x1f && usage < 0x32)
1372 else if (usage > 0x4f && usage < 0x54)
1374 else if (usage > 0x6f && usage < 0x75)
1376 else if (usage > 0x8f && usage < 0x9f)
1378 else if (usage > 0xaf && usage < 0xc0)
1387 if (usage > 0x00 && usage < 0x07)
1389 else if (usage > 0x1f && usage < 0x23)
1391 else if (usage > 0x2f && usage < 0x37)
1393 else if (usage > 0x3f && usage < 0x49)
1395 else if (usage > 0x5f && usage < 0x67)
1397 else if (usage > 0x7f && usage < 0xa5)
1399 else if (usage > 0xaf && usage < 0xcf)
1401 else if (usage > 0xdf && usage < 0xeb)
1403 else if (usage > 0xef && usage < 0xf6)
1405 else if (usage > 0xff && usage < 0x10e)
1407 else if (usage > 0x14f && usage < 0x156)
1409 else if (usage > 0x15f && usage < 0x16b)
1411 else if (usage > 0x16f && usage < 0x175)
1413 else if (usage > 0x17f && usage < 0x1c8)
1415 else if (usage > 0x1ff && usage < 0x29d)
1424 if (usage > 0x00 && usage < 0x0e)
1426 else if (usage > 0x1f && usage < 0x23)
1428 else if (usage > 0x2f && usage < 0x47)
1437 if (usage > 0x00 && usage < 0x03)
1439 else if (usage > 0x1f && usage < 0x4e)
1441 else if (usage > 0x7f && usage < 0x96)
1452 else if (usage > 0x1f && usage < 0x28)
1454 else if (usage > 0x3f && usage < 0x45)
1456 else if (usage > 0x5f && usage < 0x62)
1458 else if (usage == 0x70)
1460 else if (usage > 0x7f && usage < 0x8a)
1462 else if (usage > 0x9f && usage < 0xa2)
1553 void ReportDescParser2::OnInputItem(uint8_t itm) {
1555 uint32_t tmp = (byte_offset << 3);
1557 uint8_t *p = pBuf + byte_offset;
1562 uint8_t usage = useMin;
1564 bool print_usemin_usemax = ((useMin < useMax) && ((itm & 3) == 2) &&
pfUsage) ?
true :
false;
1566 uint8_t bits_of_byte = 8;
1569 for (uint8_t field = 0; field <
rptCount; field++, usage++) {
1573 uint16_t wResult[2];
1577 result.dwResult = 0;
1580 if (print_usemin_usemax)
1588 for (uint8_t bits_left =
rptSize, bits_to_copy = 0; bits_left;
1589 bits_left -= bits_to_copy) {
1590 bits_to_copy = (bits_left > bits_of_byte) ? bits_of_byte : bits_left;
1592 result.dwResult <<= bits_to_copy;
1596 val >>= (8 - bits_of_byte);
1600 for (uint8_t j = bits_to_copy; j; j--) {
1605 result.bResult[0] = (result.bResult[0] | (val & mask));
1607 bits_of_byte -= bits_to_copy;
1609 if (bits_of_byte < 1) {
1616 Notify(PSTR(
"\r\n"), 0x80);
1625 ErrorMessage<uint8_t > (PSTR(
"GetReportDescr-2"), ret);