Content originally posted in LPCWare by vitah on Tue May 14 21:31:47 MST 2013Hello Michael,
I thought like you too, but after digged into source code. I found that USBLIB will not always send descriptor data with the size specified in "Size" variable. Inside function Endpoint_Write_Control_Stream_LE, USBLIB will check for minimum number of Descriptor Struct size and requested length from host. So that I guess, in this case, the terminal byte will not be sent b/c host only requests size = TotalConfigurationSize.
Endpoint_Stream.c
...
uint8_t Endpoint_Write_Control_Stream_LE(uint8_t corenum, const void *const Buffer,
uint16_t Length)
{
Endpoint_Write_Stream_LE(corenum, (uint8_t *) Buffer, MIN(Length, USB_ControlRequest.wLength), NULL);
Endpoint_ClearIN(corenum);
...