Add missing SVN eol-style properties to source files to prevent mixed end-of-line characters.

pull/1469/head
Dean Camera 14 years ago
parent f10126a95e
commit 0ec2b55a7c

@ -351,12 +351,14 @@ void TMC_Task(void)
case TMC_MESSAGEID_DEV_DEP_MSG_IN: case TMC_MESSAGEID_DEV_DEP_MSG_IN:
Endpoint_ClearOUT(); Endpoint_ClearOUT();
MessageHeader.TransferSize = 3; char MessageData[] = "TMC Class Test";
MessageHeader.TransferSize = strlen(MessageData);
MessageHeader.MessageIDSpecific.DeviceOUT.LastMessageTransaction = true; MessageHeader.MessageIDSpecific.DeviceOUT.LastMessageTransaction = true;
WriteTMCHeader(&MessageHeader); WriteTMCHeader(&MessageHeader);
BytesTransferred = 0; BytesTransferred = 0;
while (Endpoint_Write_Stream_LE("TMC", MessageHeader.TransferSize, &BytesTransferred) == while (Endpoint_Write_Stream_LE(MessageData, MessageHeader.TransferSize, &BytesTransferred) ==
ENDPOINT_RWSTREAM_IncompleteTransfer) ENDPOINT_RWSTREAM_IncompleteTransfer)
{ {
if (IsTMCBulkINReset) if (IsTMCBulkINReset)
@ -388,6 +390,7 @@ void TMC_Task(void)
bool ReadTMCHeader(TMC_MessageHeader_t* const MessageHeader) bool ReadTMCHeader(TMC_MessageHeader_t* const MessageHeader)
{ {
uint16_t BytesTransferred; uint16_t BytesTransferred;
uint8_t ErrorCode;
/* Select the Data Out endpoint */ /* Select the Data Out endpoint */
Endpoint_SelectEndpoint(TMC_OUT_EPNUM); Endpoint_SelectEndpoint(TMC_OUT_EPNUM);
@ -398,7 +401,7 @@ bool ReadTMCHeader(TMC_MessageHeader_t* const MessageHeader)
/* Read in the header of the command from the host */ /* Read in the header of the command from the host */
BytesTransferred = 0; BytesTransferred = 0;
while (Endpoint_Read_Stream_LE(MessageHeader, sizeof(TMC_MessageHeader_t), &BytesTransferred) == while ((ErrorCode = Endpoint_Read_Stream_LE(MessageHeader, sizeof(TMC_MessageHeader_t), &BytesTransferred)) ==
ENDPOINT_RWSTREAM_IncompleteTransfer) ENDPOINT_RWSTREAM_IncompleteTransfer)
{ {
if (IsTMCBulkOUTReset) if (IsTMCBulkOUTReset)
@ -409,12 +412,13 @@ bool ReadTMCHeader(TMC_MessageHeader_t* const MessageHeader)
CurrentTransferTag = MessageHeader->Tag; CurrentTransferTag = MessageHeader->Tag;
/* Indicate if the command has been aborted or not */ /* Indicate if the command has been aborted or not */
return !(IsTMCBulkOUTReset); return (!(IsTMCBulkOUTReset) && (ErrorCode == ENDPOINT_RWSTREAM_NoError));
} }
bool WriteTMCHeader(TMC_MessageHeader_t* const MessageHeader) bool WriteTMCHeader(TMC_MessageHeader_t* const MessageHeader)
{ {
uint16_t BytesTransferred; uint16_t BytesTransferred;
uint8_t ErrorCode;
/* Set the message tag of the command header */ /* Set the message tag of the command header */
MessageHeader->Tag = CurrentTransferTag; MessageHeader->Tag = CurrentTransferTag;
@ -425,7 +429,7 @@ bool WriteTMCHeader(TMC_MessageHeader_t* const MessageHeader)
/* Send the command header to the host */ /* Send the command header to the host */
BytesTransferred = 0; BytesTransferred = 0;
while (Endpoint_Write_Stream_LE(MessageHeader, sizeof(TMC_MessageHeader_t), &BytesTransferred) == while ((ErrorCode = Endpoint_Write_Stream_LE(MessageHeader, sizeof(TMC_MessageHeader_t), &BytesTransferred)) ==
ENDPOINT_RWSTREAM_IncompleteTransfer) ENDPOINT_RWSTREAM_IncompleteTransfer)
{ {
if (IsTMCBulkINReset) if (IsTMCBulkINReset)
@ -433,5 +437,5 @@ bool WriteTMCHeader(TMC_MessageHeader_t* const MessageHeader)
} }
/* Indicate if the command has been aborted or not */ /* Indicate if the command has been aborted or not */
return !(IsTMCBulkINReset); return (!(IsTMCBulkINReset) && (ErrorCode == ENDPOINT_RWSTREAM_NoError));
} }

@ -18,7 +18,7 @@
* - Added new EVENT_Audio_Device_StreamStartStop() event to the Audio Device Class driver to detect stream start/stop events * - Added new EVENT_Audio_Device_StreamStartStop() event to the Audio Device Class driver to detect stream start/stop events
* - Added board driver support for the Busware TUL board * - Added board driver support for the Busware TUL board
* - Added new Host mode Audio Class driver * - Added new Host mode Audio Class driver
* - Added new \ref SPI_GetCurrentMode() function to the SPI peripheral driver * - Added new SPI_GetCurrentMode() function to the SPI peripheral driver
* - Library Applications: * - Library Applications:
* - Added RNDIS device mode to the Webserver project * - Added RNDIS device mode to the Webserver project
* - Added new incomplete AndroidAccessoryHost Host LowLevel demo * - Added new incomplete AndroidAccessoryHost Host LowLevel demo

Loading…
Cancel
Save