{\r
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)\r
{\r
- uint8_t EndpointType = (DESCRIPTOR_CAST(CurrentDescriptor,\r
- USB_Descriptor_Endpoint_t).Attributes & EP_TYPE_MASK);\r
+ USB_Descriptor_Endpoint_t* CurrentEndpoint = DESCRIPTOR_PCAST(CurrentDescriptor,\r
+ USB_Descriptor_Endpoint_t);\r
+\r
+ uint8_t EndpointType = (CurrentEndpoint->Attributes & EP_TYPE_MASK);\r
\r
if ((EndpointType == EP_TYPE_BULK) &&\r
(!(Pipe_IsEndpointBound(CurrentEndpoint->EndpointAddress))))\r
{\r
uint8_t ErrorCode = PIPE_RWSTREAM_NoError;\r
\r
- SCSICommandBlock->Tag = MSInterfaceInfo->State.TransactionTag++;\r
+ SCSICommandBlock->Tag = ++MSInterfaceInfo->State.TransactionTag;\r
\r
if (MSInterfaceInfo->State.TransactionTag == 0xFFFFFFFF)\r
MSInterfaceInfo->State.TransactionTag = 1;\r