More cosmetic data output changes to the HIDReportViewer project.
authorDean Camera <dean@fourwalledcubicle.com>
Mon, 20 Jun 2011 02:22:34 +0000 (02:22 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Mon, 20 Jun 2011 02:22:34 +0000 (02:22 +0000)
Projects/HIDReportViewer/HIDReportViewer.c

index 1dfbd40..6d48aca 100644 (file)
@@ -123,7 +123,7 @@ int main(void)
                        case HOST_STATE_Configured:\r
                                LEDs_SetAllLEDs(LEDMASK_USB_BUSY);\r
                                \r
                        case HOST_STATE_Configured:\r
                                LEDs_SetAllLEDs(LEDMASK_USB_BUSY);\r
                                \r
-                               printf_P(PSTR("\r\n\r\nTotal Reports: %" PRId8 "\r\n"), HIDReportInfo.TotalDeviceReports);\r
+                               printf_P(PSTR("\r\n\r\nTotal Device Reports: %" PRId8 "\r\n"), HIDReportInfo.TotalDeviceReports);\r
                                for (uint8_t ReportIndex = 0; ReportIndex < HIDReportInfo.TotalDeviceReports; ReportIndex++)\r
                                {\r
                                        HID_ReportSizeInfo_t* CurrReportIDInfo = &HIDReportInfo.ReportIDSizes[ReportIndex];\r
                                for (uint8_t ReportIndex = 0; ReportIndex < HIDReportInfo.TotalDeviceReports; ReportIndex++)\r
                                {\r
                                        HID_ReportSizeInfo_t* CurrReportIDInfo = &HIDReportInfo.ReportIDSizes[ReportIndex];\r
@@ -146,7 +146,7 @@ int main(void)
                                                 ((ReportSizeFeatureBits >> 3) + ((ReportSizeFeatureBits & 0x07) != 0)));\r
                                }\r
                                \r
                                                 ((ReportSizeFeatureBits >> 3) + ((ReportSizeFeatureBits & 0x07) != 0)));\r
                                }\r
                                \r
-                               puts_P(PSTR("\r\nReport Items:\r\n"));\r
+                               printf_P(PSTR("\r\nReport Items (%" PRId8 " Stored in Table):\r\n"), HIDReportInfo.TotalReportItems);\r
                                for (uint8_t ItemIndex = 0; ItemIndex < HIDReportInfo.TotalReportItems; ItemIndex++)\r
                                {\r
                                        const HID_ReportItem_t* RItem = &HIDReportInfo.ReportItems[ItemIndex];\r
                                for (uint8_t ItemIndex = 0; ItemIndex < HIDReportInfo.TotalReportItems; ItemIndex++)\r
                                {\r
                                        const HID_ReportItem_t* RItem = &HIDReportInfo.ReportItems[ItemIndex];\r
@@ -182,22 +182,15 @@ int main(void)
                                                 RItem->Attributes.Physical.Maximum);\r
                                        \r
                                        const HID_CollectionPath_t* CollectionPath  = RItem->CollectionPath;\r
                                                 RItem->Attributes.Physical.Maximum);\r
                                        \r
                                        const HID_CollectionPath_t* CollectionPath  = RItem->CollectionPath;\r
-                                       uint8_t                     CollectionDepth = 6;\r
                                        \r
                                        while (CollectionPath != NULL)\r
                                        {\r
                                        \r
                                        while (CollectionPath != NULL)\r
                                        {\r
-                                               for (uint8_t i = 0; i < CollectionDepth; i++)\r
-                                                 putchar(' ');\r
-\r
-                                               printf_P(PSTR("- Type:  0x%02" PRIX8 "\r\n"), CollectionPath->Type);\r
-                                       \r
-                                               for (uint8_t i = 0; i < CollectionDepth; i++)\r
-                                                 putchar(' ');\r
-\r
-                                               printf_P(PSTR("- Usage: 0x%02" PRIX8 "\r\n"), CollectionPath->Usage);\r
-\r
-                                               CollectionDepth += 3;\r
-                                               CollectionPath   = CollectionPath->Parent;\r
+                                               printf_P(PSTR("      |\r\n"\r
+                                                             "      - Type:  0x%02" PRIX8 "\r\n"\r
+                                                             "      - Usage: 0x%02" PRIX8 "\r\n"),\r
+                                                             CollectionPath->Type, CollectionPath->Usage);\r
+                                               \r
+                                               CollectionPath = CollectionPath->Parent;\r
                                        }\r
                                }\r
                                \r
                                        }\r
                                }\r
                                \r