projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed AVRISP-MKII Clone compile warning on AVR8 U4 targets even when NO_VTARGET_DETEC...
[pub/USBasp.git]
/
LUFA
/
Drivers
/
USB
/
Class
/
Host
/
CDC.c
diff --git
a/LUFA/Drivers/USB/Class/Host/CDC.c
b/LUFA/Drivers/USB/Class/Host/CDC.c
index
73e634b
..
2b98359
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/CDC.c
+++ b/
LUFA/Drivers/USB/Class/Host/CDC.c
@@
-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_CDC_DRIVER
#if defined(USB_CAN_BE_HOST)
#define __INCLUDE_FROM_CDC_DRIVER
@@
-85,7
+86,7
@@
uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo
USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Endpoint_t);
USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Endpoint_t);
- if (
EndpointData->EndpointAddress & ENDPOINT_DESCRIPTOR
_DIR_IN)
+ if (
(EndpointData->EndpointAddress & ENDPOINT_DIR_MASK) == ENDPOINT
_DIR_IN)
{
if ((EndpointData->Attributes & EP_TYPE_MASK) == EP_TYPE_INTERRUPT)
NotificationEndpoint = EndpointData;
{
if ((EndpointData->Attributes & EP_TYPE_MASK) == EP_TYPE_INTERRUPT)
NotificationEndpoint = EndpointData;
@@
-109,7
+110,7
@@
uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo
if (PipeNum == CDCInterfaceInfo->Config.DataINPipeNumber)
{
if (PipeNum == CDCInterfaceInfo->Config.DataINPipeNumber)
{
- Size =
DataINEndpoint->EndpointSize
;
+ Size =
le16_to_cpu(DataINEndpoint->EndpointSize)
;
EndpointAddress = DataINEndpoint->EndpointAddress;
Token = PIPE_TOKEN_IN;
Type = EP_TYPE_BULK;
EndpointAddress = DataINEndpoint->EndpointAddress;
Token = PIPE_TOKEN_IN;
Type = EP_TYPE_BULK;
@@
-120,7
+121,7
@@
uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo
}
else if (PipeNum == CDCInterfaceInfo->Config.DataOUTPipeNumber)
{
}
else if (PipeNum == CDCInterfaceInfo->Config.DataOUTPipeNumber)
{
- Size =
DataOUTEndpoint->EndpointSize
;
+ Size =
le16_to_cpu(DataOUTEndpoint->EndpointSize)
;
EndpointAddress = DataOUTEndpoint->EndpointAddress;
Token = PIPE_TOKEN_OUT;
Type = EP_TYPE_BULK;
EndpointAddress = DataOUTEndpoint->EndpointAddress;
Token = PIPE_TOKEN_OUT;
Type = EP_TYPE_BULK;
@@
-131,7
+132,7
@@
uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo
}
else if (PipeNum == CDCInterfaceInfo->Config.NotificationPipeNumber)
{
}
else if (PipeNum == CDCInterfaceInfo->Config.NotificationPipeNumber)
{
- Size =
NotificationEndpoint->EndpointSize
;
+ Size =
le16_to_cpu(NotificationEndpoint->EndpointSize)
;
EndpointAddress = NotificationEndpoint->EndpointAddress;
Token = PIPE_TOKEN_IN;
Type = EP_TYPE_INTERRUPT;
EndpointAddress = NotificationEndpoint->EndpointAddress;
Token = PIPE_TOKEN_IN;
Type = EP_TYPE_INTERRUPT;
@@
-365,7
+366,7
@@
uint8_t CDC_Host_SendByte(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
return ErrorCode;
}
return ErrorCode;
}
- Pipe_Write_
Byte
(Data);
+ Pipe_Write_
8
(Data);
Pipe_Freeze();
return PIPE_READYWAIT_NoError;
Pipe_Freeze();
return PIPE_READYWAIT_NoError;
@@
-414,7
+415,7
@@
int16_t CDC_Host_ReceiveByte(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo)
if (Pipe_IsINReceived())
{
if (Pipe_BytesInPipe())
if (Pipe_IsINReceived())
{
if (Pipe_BytesInPipe())
- ReceivedByte = Pipe_Read_
Byte
();
+ ReceivedByte = Pipe_Read_
8
();
if (!(Pipe_BytesInPipe()))
Pipe_ClearIN();
if (!(Pipe_BytesInPipe()))
Pipe_ClearIN();
@@
-455,6
+456,7
@@
uint8_t CDC_Host_Flush(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo)
return PIPE_READYWAIT_NoError;
}
return PIPE_READYWAIT_NoError;
}
+#if defined(FDEV_SETUP_STREAM)
void CDC_Host_CreateStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
FILE* const Stream)
{
void CDC_Host_CreateStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
FILE* const Stream)
{
@@
-500,6
+502,7
@@
static int CDC_Host_getchar_Blocking(FILE* Stream)
return ReceivedByte;
}
return ReceivedByte;
}
+#endif
void CDC_Host_Event_Stub(void)
{
void CDC_Host_Event_Stub(void)
{