diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-09-28 12:14:06 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-09-28 12:14:06 +0000 |
commit | 713670043a1edb714461fc83c2b8817f3db99961 (patch) | |
tree | 9c45545908c0ad14ad8e136e34de00867fc569a7 /LUFA/Drivers/USB/Class/Device/HID.c | |
parent | 800485bd95de4287006a0d0aa099bc510e929531 (diff) | |
download | lufa-713670043a1edb714461fc83c2b8817f3db99961.tar.gz lufa-713670043a1edb714461fc83c2b8817f3db99961.tar.bz2 lufa-713670043a1edb714461fc83c2b8817f3db99961.zip |
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.
Diffstat (limited to 'LUFA/Drivers/USB/Class/Device/HID.c')
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/HID.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/LUFA/Drivers/USB/Class/Device/HID.c b/LUFA/Drivers/USB/Class/Device/HID.c index 1953d9fbc..5111eba59 100644 --- a/LUFA/Drivers/USB/Class/Device/HID.c +++ b/LUFA/Drivers/USB/Class/Device/HID.c @@ -45,7 +45,7 @@ void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter switch (USB_ControlRequest.bRequest) { - case REQ_GetReport: + case HID_REQ_GetReport: if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE)) { uint16_t ReportSize = 0; @@ -68,7 +68,7 @@ void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter } break; - case REQ_SetReport: + case HID_REQ_SetReport: if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) { uint16_t ReportSize = USB_ControlRequest.wLength; @@ -84,7 +84,7 @@ void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter } break; - case REQ_GetProtocol: + case HID_REQ_GetProtocol: if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE)) { Endpoint_ClearSETUP(); @@ -94,7 +94,7 @@ void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter } break; - case REQ_SetProtocol: + case HID_REQ_SetProtocol: if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) { Endpoint_ClearSETUP(); @@ -104,7 +104,7 @@ void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter } break; - case REQ_SetIdle: + case HID_REQ_SetIdle: if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) { Endpoint_ClearSETUP(); @@ -114,7 +114,7 @@ void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter } break; - case REQ_GetIdle: + case HID_REQ_GetIdle: if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE)) { Endpoint_ClearSETUP(); @@ -158,7 +158,7 @@ void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo) memset(ReportINData, 0, sizeof(ReportINData)); - bool ForceSend = CALLBACK_HID_Device_CreateHIDReport(HIDInterfaceInfo, &ReportID, REPORT_ITEM_TYPE_In, + bool ForceSend = CALLBACK_HID_Device_CreateHIDReport(HIDInterfaceInfo, &ReportID, HID_REPORT_ITEM_In, ReportINData, &ReportINSize); bool StatesChanged = false; bool IdlePeriodElapsed = (HIDInterfaceInfo->State.IdleCount && !(HIDInterfaceInfo->State.IdleMSRemaining)); |