*
* @param endPoint
* @return The new pipe.
*/
public USBPipe createPipe(USBEndPoint endPoint) {
final EndPointDescriptor descr = endPoint.getDescriptor();
final USBDevice device = endPoint.getDevice();
final QueueHead skelQH;
switch (descr.getTransferType()) {
case USB_ENDPOINT_XFER_CONTROL:
if (device.isLowSpeed()) {
skelQH = schedule.getLowSpeedControlQH();
} else {
skelQH = schedule.getHighSpeedControlQH();
}
return new UHCIControlPipe(this, rm, device, endPoint, skelQH);
case USB_ENDPOINT_XFER_INT:
skelQH = schedule.getInterruptQH(descr.getInterval());
return new UHCIDataPipe(this, rm, device, endPoint, skelQH);
case USB_ENDPOINT_XFER_BULK:
skelQH = schedule.getBulkQH();
return new UHCIDataPipe(this, rm, device, endPoint, skelQH);
default: