LIBUSB_TRANSFER_ADD_ZERO_PACKET constant
Terminate transfers that are a multiple of the endpoint's wMaxPacketSize with an extra zero length packet. This is useful when a device protocol mandates that each logical request is terminated by an incomplete packet (i.e. the logical requests are not separated by other means).
This flag only affects host-to-device transfers to bulk and interrupt endpoints. In other situations, it is ignored.
This flag only affects transfers with a length that is a multiple of the endpoint's wMaxPacketSize. On transfers of other lengths, this flag has no effect. Therefore, if you are working with a device that needs a ZLP whenever the end of the logical request falls on a packet boundary, then it is sensible to set this flag on every transfer (you do not have to worry about only setting it on transfers that end on the boundary).
This flag is currently only supported on Linux. On other systems, libusb_submit_transfer() will return LIBUSB_ERROR_NOT_SUPPORTED for every transfer where this flag is set.
Available since libusb-1.0.9.
Implementation
static const int LIBUSB_TRANSFER_ADD_ZERO_PACKET = 8;