Home |
Function RTUGetEndpoint Function RTUEndpointPacketSize |
Function RTUGetEndpointRTUGetEndpoint returns a pointer to an endpoint descriptor: typedef struct { BYTE bLength; // length in bytes of this descriptor BYTE bDescriptor; // descriptor ID (5) BYTE bEndPointAddress; // address and direction BYTE bmAttributes; // transfer, synch, and usage type WORD wMaxPacketSize; // max packet size, packets per microframe BYTE bInterval; // polling interval in [micro]frames } RTUEndpointDescriptor; const RTUEndpointDescriptor * RTUGetEndpoint(const RTUInterfaceDescriptor * Interface, int Endpoint); ParametersInterfacePointer to an interface descriptor of the interface containing the desired endpoint. EndpointZero-based index of the endpoint to retrieve. This parameter must be in the range 0 .. RTUInterfaceDescriptor.bNumEndpoints-1. return valuePointer to the desired endpoint descriptor or NULL if parameter Endpoint is out of range. Endpoint descriptors are required by RTUOpenPipe. Members bEndPointAddress, bmAttributes, wMaxPacketSize, and bInterval contain bit fields and should not be addressed directly. Use functions RTUEndpointDirection, RTUEndpointType, RTUEndpointPacketSize, and RTUEndpointInterval instead. Further details about the endpoint descriptor are given in the USB specification.
|