1 uint8_t TEMPLATE_FUNC_NAME (void* Buffer
, uint16_t Length
)
3 uint8_t* DataStream
= (uint8_t*)(Buffer
+ TEMPLATE_BUFFER_OFFSET(Length
));
7 if (Endpoint_IsOUTReceived())
9 while (Length
&& Endpoint_BytesInEndpoint())
11 TEMPLATE_TRANSFER_BYTE(DataStream
);
18 if (USB_DeviceState
== DEVICE_STATE_Unattached
)
19 return ENDPOINT_RWCSTREAM_DeviceDisconnected
;
22 while (!(Endpoint_IsINReady()))
24 if (USB_DeviceState
== DEVICE_STATE_Unattached
)
25 return ENDPOINT_RWCSTREAM_DeviceDisconnected
;
28 return ENDPOINT_RWCSTREAM_NoError
;
32 #undef TEMPLATE_BUFFER_OFFSET
33 #undef TEMPLATE_FUNC_NAME
34 #undef TEMPLATE_TRANSFER_BYTE