projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Spell check library source code files.
[pub/USBasp.git]
/
LUFA
/
Drivers
/
USB
/
Class
/
Host
/
HID.c
diff --git
a/LUFA/Drivers/USB/Class/Host/HID.c
b/LUFA/Drivers/USB/Class/Host/HID.c
index
e6c575e
..
992f7b3
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/HID.c
+++ b/
LUFA/Drivers/USB/Class/Host/HID.c
@@
-1,13
+1,13
@@
/*
LUFA Library
/*
LUFA Library
- Copyright (C) Dean Camera, 201
0
.
+ Copyright (C) Dean Camera, 201
1
.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
- Copyright 201
0
Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 201
1
Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
@@
-29,7
+29,8
@@
*/
#define __INCLUDE_FROM_USB_DRIVER
*/
#define __INCLUDE_FROM_USB_DRIVER
-#include "../../HighLevel/USBMode.h"
+#include "../../Core/USBMode.h"
+
#if defined(USB_CAN_BE_HOST)
#define __INCLUDE_FROM_HID_DRIVER
#if defined(USB_CAN_BE_HOST)
#define __INCLUDE_FROM_HID_DRIVER
@@
-88,7
+89,7
@@
uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Endpoint_t);
if (EndpointData->EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)
USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Endpoint_t);
if (EndpointData->EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)
- DataINEndpoint = EndpointData;
+ DataINEndpoint
= EndpointData;
else
DataOUTEndpoint = EndpointData;
}
else
DataOUTEndpoint = EndpointData;
}
@@
-115,6
+116,9
@@
uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
}
else if (PipeNum == HIDInterfaceInfo->Config.DataOUTPipeNumber)
{
}
else if (PipeNum == HIDInterfaceInfo->Config.DataOUTPipeNumber)
{
+ if (DataOUTEndpoint == NULL)
+ continue;
+
Size = DataOUTEndpoint->EndpointSize;
EndpointAddress = DataOUTEndpoint->EndpointAddress;
Token = PIPE_TOKEN_OUT;
Size = DataOUTEndpoint->EndpointSize;
EndpointAddress = DataOUTEndpoint->EndpointAddress;
Token = PIPE_TOKEN_OUT;
@@
-236,7
+240,7
@@
uint8_t HID_Host_ReceiveReport(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo,
if (HIDInterfaceInfo->Config.HIDParserData->UsingReportIDs)
{
if (HIDInterfaceInfo->Config.HIDParserData->UsingReportIDs)
{
- ReportID = Pipe_Read_
Byte
();
+ ReportID = Pipe_Read_
8
();
*(BufferPos++) = ReportID;
}
*(BufferPos++) = ReportID;
}
@@
-248,7
+252,7
@@
uint8_t HID_Host_ReceiveReport(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo,
ReportSize = Pipe_BytesInPipe();
}
ReportSize = Pipe_BytesInPipe();
}
- if ((ErrorCode = Pipe_Read_Stream_LE(BufferPos, ReportSize, N
O_STREAM_CALLBACK
)) != PIPE_RWSTREAM_NoError)
+ if ((ErrorCode = Pipe_Read_Stream_LE(BufferPos, ReportSize, N
ULL
)) != PIPE_RWSTREAM_NoError)
return ErrorCode;
Pipe_ClearIN();
return ErrorCode;
Pipe_ClearIN();
@@
-277,9
+281,9
@@
uint8_t HID_Host_SendReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
Pipe_Unfreeze();
if (ReportID)
Pipe_Unfreeze();
if (ReportID)
- Pipe_Write_Stream_LE(&ReportID, sizeof(ReportID), N
O_STREAM_CALLBACK
);
+ Pipe_Write_Stream_LE(&ReportID, sizeof(ReportID), N
ULL
);
- if ((ErrorCode = Pipe_Write_Stream_LE(Buffer, ReportSize, N
O_STREAM_CALLBACK
)) != PIPE_RWSTREAM_NoError)
+ if ((ErrorCode = Pipe_Write_Stream_LE(Buffer, ReportSize, N
ULL
)) != PIPE_RWSTREAM_NoError)
return ErrorCode;
Pipe_ClearOUT();
return ErrorCode;
Pipe_ClearOUT();