aboutsummaryrefslogtreecommitdiffstats
path: root/Projects
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-06-20 02:22:34 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-06-20 02:22:34 +0000
commitea3b5c74235c730bb3cfd51d15a9cb668dc34941 (patch)
treef5abe6048a1ede7c681b56ffd4ce6c815ed585dd /Projects
parent91bc546be07ae20c9b35fb95f192e6cf26e1e721 (diff)
downloadlufa-ea3b5c74235c730bb3cfd51d15a9cb668dc34941.tar.gz
lufa-ea3b5c74235c730bb3cfd51d15a9cb668dc34941.tar.bz2
lufa-ea3b5c74235c730bb3cfd51d15a9cb668dc34941.zip
More cosmetic data output changes to the HIDReportViewer project.
Diffstat (limited to 'Projects')
-rw-r--r--Projects/HIDReportViewer/HIDReportViewer.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/Projects/HIDReportViewer/HIDReportViewer.c b/Projects/HIDReportViewer/HIDReportViewer.c
index 1dfbd4058..6d48aca78 100644
--- a/Projects/HIDReportViewer/HIDReportViewer.c
+++ b/Projects/HIDReportViewer/HIDReportViewer.c
@@ -123,7 +123,7 @@ int main(void)
case HOST_STATE_Configured:
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
- printf_P(PSTR("\r\n\r\nTotal Reports: %" PRId8 "\r\n"), HIDReportInfo.TotalDeviceReports);
+ printf_P(PSTR("\r\n\r\nTotal Device Reports: %" PRId8 "\r\n"), HIDReportInfo.TotalDeviceReports);
for (uint8_t ReportIndex = 0; ReportIndex < HIDReportInfo.TotalDeviceReports; ReportIndex++)
{
HID_ReportSizeInfo_t* CurrReportIDInfo = &HIDReportInfo.ReportIDSizes[ReportIndex];
@@ -146,7 +146,7 @@ int main(void)
((ReportSizeFeatureBits >> 3) + ((ReportSizeFeatureBits & 0x07) != 0)));
}
- puts_P(PSTR("\r\nReport Items:\r\n"));
+ printf_P(PSTR("\r\nReport Items (%" PRId8 " Stored in Table):\r\n"), HIDReportInfo.TotalReportItems);
for (uint8_t ItemIndex = 0; ItemIndex < HIDReportInfo.TotalReportItems; ItemIndex++)
{
const HID_ReportItem_t* RItem = &HIDReportInfo.ReportItems[ItemIndex];
@@ -182,22 +182,15 @@ int main(void)
RItem->Attributes.Physical.Maximum);
const HID_CollectionPath_t* CollectionPath = RItem->CollectionPath;
- uint8_t CollectionDepth = 6;
while (CollectionPath != NULL)
{
- for (uint8_t i = 0; i < CollectionDepth; i++)
- putchar(' ');
-
- printf_P(PSTR("- Type: 0x%02" PRIX8 "\r\n"), CollectionPath->Type);
-
- for (uint8_t i = 0; i < CollectionDepth; i++)
- putchar(' ');
-
- printf_P(PSTR("- Usage: 0x%02" PRIX8 "\r\n"), CollectionPath->Usage);
-
- CollectionDepth += 3;
- CollectionPath = CollectionPath->Parent;
+ printf_P(PSTR(" |\r\n"
+ " - Type: 0x%02" PRIX8 "\r\n"
+ " - Usage: 0x%02" PRIX8 "\r\n"),
+ CollectionPath->Type, CollectionPath->Usage);
+
+ CollectionPath = CollectionPath->Parent;
}
}