From 713670043a1edb714461fc83c2b8817f3db99961 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Tue, 28 Sep 2010 12:14:06 +0000 Subject: Move out many of the common class driver constants into grouped enums, to make them more managable. Add new CDC descriptor structs to the CDC class driver, so that the CDC demos can use human readable field names. Rename prefix for Still Image Host class driver functions from "SImage_" to "SI_" to remain consistent with the rest of the driver. --- .../LowLevel/JoystickHostWithParser/JoystickHostWithParser.c | 10 +++++----- .../LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c | 8 ++++---- Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h | 2 +- .../Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c | 12 ++++++------ 4 files changed, 16 insertions(+), 16 deletions(-) (limited to 'Demos/Host/LowLevel') diff --git a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c index e92c242d26..cf469ffec7 100644 --- a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c +++ b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c @@ -193,9 +193,9 @@ void Joystick_HID_Task(void) { HID_ReportSizeInfo_t* CurrReportIDInfo = &HIDReportInfo.ReportIDSizes[i]; - uint8_t ReportSizeInBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_In]; - uint8_t ReportSizeOutBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_Out]; - uint8_t ReportSizeFeatureBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_Feature]; + uint8_t ReportSizeInBits = CurrReportIDInfo->ReportSizeBits[HID_REPORT_ITEM_In]; + uint8_t ReportSizeOutBits = CurrReportIDInfo->ReportSizeBits[HID_REPORT_ITEM_Out]; + uint8_t ReportSizeFeatureBits = CurrReportIDInfo->ReportSizeBits[HID_REPORT_ITEM_Feature]; /* Print out the byte sizes of each report within the device */ printf_P(PSTR(" + Report ID %d - In: %d bytes, Out: %d bytes, Feature: %d bytes\r\n"), @@ -258,7 +258,7 @@ void ProcessJoystickReport(uint8_t* JoystickReport) bool FoundData; if ((ReportItem->Attributes.Usage.Page == USAGE_PAGE_BUTTON) && - (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) + (ReportItem->ItemType == HID_REPORT_ITEM_In)) { /* Get the joystick button value */ FoundData = USB_GetHIDReportItemInfo(JoystickReport, ReportItem); @@ -274,7 +274,7 @@ void ProcessJoystickReport(uint8_t* JoystickReport) else if ((ReportItem->Attributes.Usage.Page == USAGE_PAGE_GENERIC_DCTRL) && ((ReportItem->Attributes.Usage.Usage == USAGE_X) || (ReportItem->Attributes.Usage.Usage == USAGE_Y)) && - (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) + (ReportItem->ItemType == HID_REPORT_ITEM_In)) { /* Get the joystick relative position value */ FoundData = USB_GetHIDReportItemInfo(JoystickReport, ReportItem); diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c index dfb1a4a087..94aca2fef0 100644 --- a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c +++ b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c @@ -194,9 +194,9 @@ void Keyboard_HID_Task(void) { HID_ReportSizeInfo_t* CurrReportIDInfo = &HIDReportInfo.ReportIDSizes[i]; - uint8_t ReportSizeInBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_In]; - uint8_t ReportSizeOutBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_Out]; - uint8_t ReportSizeFeatureBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_Feature]; + uint8_t ReportSizeInBits = CurrReportIDInfo->ReportSizeBits[HID_REPORT_ITEM_In]; + uint8_t ReportSizeOutBits = CurrReportIDInfo->ReportSizeBits[HID_REPORT_ITEM_Out]; + uint8_t ReportSizeFeatureBits = CurrReportIDInfo->ReportSizeBits[HID_REPORT_ITEM_Feature]; /* Print out the byte sizes of each report within the device */ printf_P(PSTR(" + Report ID %d - In: %d bytes, Out: %d bytes, Feature: %d bytes\r\n"), @@ -258,7 +258,7 @@ void ProcessKeyboardReport(uint8_t* KeyboardReport) if ((ReportItem->Attributes.Usage.Page == USAGE_PAGE_KEYBOARD) && (ReportItem->Attributes.BitSize == 8) && (ReportItem->Attributes.Logical.Maximum > 1) && - (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) + (ReportItem->ItemType == HID_REPORT_ITEM_In)) { /* Retrieve the keyboard scan-code from the report data retrieved from the device */ bool FoundData = USB_GetHIDReportItemInfo(KeyboardReport, ReportItem); diff --git a/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h b/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h index d9e90a8da5..bb038f1c56 100644 --- a/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h +++ b/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h @@ -75,7 +75,7 @@ /** Additional error code for Mass Storage functions when a device returns a logical command failure. */ #define MASS_STORE_SCSI_COMMAND_FAILED 0xC0 - /* Type defines: */ + /* Type Defines: */ /** Type define for a Mass Storage class Command Block Wrapper, used to wrap SCSI * commands for transport over the USB bulk endpoints to the device. */ diff --git a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c index 38e4b2564a..5536d872b5 100644 --- a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c +++ b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c @@ -194,9 +194,9 @@ void Mouse_HID_Task(void) { HID_ReportSizeInfo_t* CurrReportIDInfo = &HIDReportInfo.ReportIDSizes[i]; - uint8_t ReportSizeInBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_In]; - uint8_t ReportSizeOutBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_Out]; - uint8_t ReportSizeFeatureBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_Feature]; + uint8_t ReportSizeInBits = CurrReportIDInfo->ReportSizeBits[HID_REPORT_ITEM_In]; + uint8_t ReportSizeOutBits = CurrReportIDInfo->ReportSizeBits[HID_REPORT_ITEM_Out]; + uint8_t ReportSizeFeatureBits = CurrReportIDInfo->ReportSizeBits[HID_REPORT_ITEM_Feature]; /* Print out the byte sizes of each report within the device */ printf_P(PSTR(" + Report ID %d - In: %d bytes, Out: %d bytes, Feature: %d bytes\r\n"), @@ -259,7 +259,7 @@ void ProcessMouseReport(uint8_t* MouseReport) bool FoundData; if ((ReportItem->Attributes.Usage.Page == USAGE_PAGE_BUTTON) && - (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) + (ReportItem->ItemType == HID_REPORT_ITEM_In)) { /* Get the mouse button value */ FoundData = USB_GetHIDReportItemInfo(MouseReport, ReportItem); @@ -274,7 +274,7 @@ void ProcessMouseReport(uint8_t* MouseReport) } else if ((ReportItem->Attributes.Usage.Page == USAGE_PAGE_GENERIC_DCTRL) && (ReportItem->Attributes.Usage.Usage == USAGE_SCROLL_WHEEL) && - (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) + (ReportItem->ItemType == HID_REPORT_ITEM_In)) { /* Get the mouse wheel value if it is contained within the current * report, if not, skip to the next item in the parser list @@ -290,7 +290,7 @@ void ProcessMouseReport(uint8_t* MouseReport) else if ((ReportItem->Attributes.Usage.Page == USAGE_PAGE_GENERIC_DCTRL) && ((ReportItem->Attributes.Usage.Usage == USAGE_X) || (ReportItem->Attributes.Usage.Usage == USAGE_Y)) && - (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) + (ReportItem->ItemType == HID_REPORT_ITEM_In)) { /* Get the mouse relative position value */ FoundData = USB_GetHIDReportItemInfo(MouseReport, ReportItem); -- cgit v1.2.3