diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-07-05 00:28:35 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-07-05 00:28:35 +0000 |
commit | 9ea22ebf4199b111b249309de2d0f0e8db5c6041 (patch) | |
tree | fd1ed3cdb5ae4e145259c3638918ef32465b8e7d /LUFA/Drivers/USB/Class/Host | |
parent | 5b06886dab18711c33c884e8da81b66d0f3f1541 (diff) | |
download | lufa-9ea22ebf4199b111b249309de2d0f0e8db5c6041.tar.gz lufa-9ea22ebf4199b111b249309de2d0f0e8db5c6041.tar.bz2 lufa-9ea22ebf4199b111b249309de2d0f0e8db5c6041.zip |
Fix HID_Host_SetIdlePeriod() function to send the correct request type to the device, remove reference to unavailable (and not needed) local variable.
Diffstat (limited to 'LUFA/Drivers/USB/Class/Host')
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/HID.c | 4 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/HID.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/LUFA/Drivers/USB/Class/Host/HID.c b/LUFA/Drivers/USB/Class/Host/HID.c index 606b3dfed..94d09f356 100644 --- a/LUFA/Drivers/USB/Class/Host/HID.c +++ b/LUFA/Drivers/USB/Class/Host/HID.c @@ -362,7 +362,7 @@ uint8_t HID_Host_SetIdlePeriod(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, { USB_ControlRequest = (USB_Request_Header_t) { - .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_INTERFACE), + .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE), .bRequest = HID_REQ_SetIdle, .wValue = ((MS << 6) & 0xFF00), .wIndex = HIDInterfaceInfo->State.InterfaceNumber, @@ -371,7 +371,7 @@ uint8_t HID_Host_SetIdlePeriod(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, Pipe_SelectPipe(PIPE_CONTROLPIPE); - return USB_Host_SendControlRequest(HIDReportData); + return USB_Host_SendControlRequest(NULL); } #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY) diff --git a/LUFA/Drivers/USB/Class/Host/HID.h b/LUFA/Drivers/USB/Class/Host/HID.h index b9d8f68d6..a0bef784a 100644 --- a/LUFA/Drivers/USB/Class/Host/HID.h +++ b/LUFA/Drivers/USB/Class/Host/HID.h @@ -261,7 +261,7 @@ * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum. */ uint8_t HID_Host_SetIdlePeriod(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, - const uint16_t MS); + const uint16_t MS) ATTR_NON_NULL_PTR_ARG(1); #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY) /** Switches the attached HID device's reporting protocol over to the standard Report protocol mode. This also retrieves |