burst = ( descx ? descx->burst : USB_ENDPOINT_BURST ( sizes ) );
/* Calculate interval */
- if ( type == USB_INTERRUPT ) {
+ if ( ( type & USB_ENDPOINT_ATTR_TYPE_MASK ) ==
+ USB_ENDPOINT_ATTR_INTERRUPT ) {
if ( port->speed >= USB_SPEED_HIGH ) {
/* 2^(desc->interval-1) is a microframe count */
interval = ( 1 << ( desc->interval - 1 ) );
/* Locate interrupt endpoint descriptor */
if ( ( rc = usb_endpoint_described ( &hubdev->intr, config, interface,
- USB_INTERRUPT, 0 ) ) != 0 ) {
+ USB_INTERRUPT_IN, 0 ) ) != 0 ) {
DBGC ( hubdev, "HUB %s could not describe interrupt endpoint: "
"%s\n", hubdev->name, strerror ( rc ) );
goto err_endpoint;
/* Describe interrupt endpoint */
if ( ( rc = usb_endpoint_described ( &usbnet->intr, config,
- desc, USB_INTERRUPT,
+ desc, USB_INTERRUPT_IN,
0 ) ) != 0 )
continue;
/** Bulk IN endpoint (internal) type */
#define USB_BULK_IN ( USB_ENDPOINT_ATTR_BULK | USB_DIR_IN )
-/** Interrupt endpoint (internal) type */
-#define USB_INTERRUPT ( USB_ENDPOINT_ATTR_INTERRUPT | USB_DIR_IN )
+/** Interrupt IN endpoint (internal) type */
+#define USB_INTERRUPT_IN ( USB_ENDPOINT_ATTR_INTERRUPT | USB_DIR_IN )
+
+/** Interrupt OUT endpoint (internal) type */
+#define USB_INTERRUPT_OUT ( USB_ENDPOINT_ATTR_INTERRUPT | USB_DIR_OUT )
/** USB endpoint MTU */
#define USB_ENDPOINT_MTU(sizes) ( ( (sizes) >> 0 ) & 0x07ff )